From ee5e084b6344abedb5226e4f7e38837095ca7fac Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Wed, 19 Aug 2015 01:02:41 +0200 Subject: [PATCH] Improved error handling. --- script/websocket-server.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/websocket-server.rb b/script/websocket-server.rb index eea1877a4..c2b3184b8 100755 --- a/script/websocket-server.rb +++ b/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