Browse Source

Improved error handling.

Martin Edenhofer 9 years ago
parent
commit
ee5e084b63
1 changed files with 1 additions and 1 deletions
  1. 1 1
      script/websocket-server.rb

+ 1 - 1
script/websocket-server.rb

@@ -184,7 +184,7 @@ EventMachine.run {
       if data['action'] == 'login'
 
         # get user_id
-        if data['session_id']
+        if data && data['session_id']
           session = ActiveRecord::SessionStore::Session.find_by( session_id: data['session_id'] )
         end