diff --git a/ruby/lib/jam_ruby/connection_manager.rb b/ruby/lib/jam_ruby/connection_manager.rb index 1e2114457..6e0219650 100644 --- a/ruby/lib/jam_ruby/connection_manager.rb +++ b/ruby/lib/jam_ruby/connection_manager.rb @@ -147,7 +147,9 @@ SQL # NOTE this is only used for testing purposes; # actual deletes will be processed in the websocket context which cleans up dependencies def expire_stale_connections(gateway_name) - self.stale_connection_client_ids(gateway_name).each { |client| self.delete_connection(client[:client_id]) } + self.stale_connection_client_ids(gateway_name).each { |client| + self.delete_connection(client[:client_id]) + } end def connection_client_ids_for_gateway(gateway_name) diff --git a/websocket-gateway/Gemfile.lock b/websocket-gateway/Gemfile.lock index 0d55603f3..4229e9917 100644 --- a/websocket-gateway/Gemfile.lock +++ b/websocket-gateway/Gemfile.lock @@ -10,7 +10,6 @@ PATH GEM remote: http://rubygems.org/ - remote: https://jamjam:blueberryjam@int.jamkazam.com/gems/ remote: https://int.jamkazam.com/gems/ specs: aasm (5.4.0) diff --git a/websocket-gateway/lib/jam_websockets/router.rb b/websocket-gateway/lib/jam_websockets/router.rb index 7dedfca41..fbb2b70dd 100644 --- a/websocket-gateway/lib/jam_websockets/router.rb +++ b/websocket-gateway/lib/jam_websockets/router.rb @@ -492,7 +492,7 @@ module JamWebsockets websocket_comm(client, nil) do client.x_forwarded_for = handshake.headers["X-Forwarded-For"] client.query = handshake.query - #handle_login(client, client.query, client.x_forwarded_for) + handle_login(client, client.query, client.x_forwarded_for) end } } @@ -645,9 +645,7 @@ module JamWebsockets client.query["token"] = client_msg.login.token client.query["username"] = client_msg.login.username client.query["password"] = client_msg.login.password - time_it('login') { - #handle_login(client, client.query, client.x_forwarded_for, false) - } + time_it('login') { handle_login(client, client.query, client.x_forwarded_for, false) } elsif client_msg.type == ClientMessage::Type::LOGOUT # this is currently only a jamblaster path time_it('login') { handle_logout(client) } @@ -1239,7 +1237,7 @@ module JamWebsockets if !token.nil? && token != '' @log.debug "logging in via token" # attempt login with token - user = User.find_by(remember_token: token) + user = User.find_by_remember_token(token) if user.nil? @log.debug "no user found with token #{token}"