Skip to content

Commit

Permalink
Supplied logger as a param while decoding recovery key
Browse files Browse the repository at this point in the history
  • Loading branch information
sacOO7 committed May 17, 2024
1 parent aae4a71 commit ad66ec6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/ably/realtime/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def initialize(options)
@connection = Ably::Realtime::Connection.new(self, options)

unless @recover.empty?
recovery_context = RecoveryKeyContext.from_json(@recover)
recovery_context = RecoveryKeyContext.from_json(@recover, logger)
unless recovery_context.nil?
@channels.set_channel_serials recovery_context.channel_serials
@connection.message_serial = recovery_context.msg_serial # RTN16f
Expand Down
4 changes: 2 additions & 2 deletions lib/ably/realtime/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -483,11 +483,11 @@ def create_websocket_transport
url_params.merge! resume: key
logger.debug { "Resuming connection with key #{key}" }
elsif not (client.recover.nil? || client.recover.empty?)
recovery_context = RecoveryKeyContext.from_json client.recover
recovery_context = RecoveryKeyContext.from_json(client.recover, logger)
unless recovery_context.nil?
key = recovery_context.connection_key
logger.debug { "Recovering connection with key #{key}" }
url_params.merge! resume: key
url_params.merge! recover: key
end
end

Expand Down

0 comments on commit ad66ec6

Please sign in to comment.