diff --git a/lib/jam_websockets/router.rb b/lib/jam_websockets/router.rb index c07c1ebd0..e9fd58e1d 100644 --- a/lib/jam_websockets/router.rb +++ b/lib/jam_websockets/router.rb @@ -84,8 +84,10 @@ module JamWebsockets routing_key = headers.envelope.routing_key user_id = routing_key["user.".length..-1] @sempahore.synchronize do + @log.debug "USER ID = #{user_id}" contexts = @user_context_lookup[user_id] + @log.debug "CONTEXT = #{contexts}" unless contexts.nil? @log.debug "received user-directed message for user: #{user_id}" @@ -507,7 +509,7 @@ module JamWebsockets def handle_heartbeat(heartbeat, client) context = @clients[client] @log.debug "updating timestamp for user #{context}" - connection = Connection.find_by_user_id_and_client_id(context.user.user_id, context.client.client_id) + connection = Connection.find_by_user_id_and_client_id(context.user.id, context.client.client_id) unless connection.nil? connection.updated_at = DateTime.now