fixed bug
This commit is contained in:
parent
76883a0d7e
commit
c388f9e169
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue