From ad66ec6b0056cae838b9a8ba243f221db5ef0ad4 Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Fri, 17 May 2024 16:07:43 +0530 Subject: [PATCH] Supplied logger as a param while decoding recovery key --- lib/ably/realtime/client.rb | 2 +- lib/ably/realtime/connection.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ably/realtime/client.rb b/lib/ably/realtime/client.rb index 1f0e0bb1..4ca31fe6 100644 --- a/lib/ably/realtime/client.rb +++ b/lib/ably/realtime/client.rb @@ -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 diff --git a/lib/ably/realtime/connection.rb b/lib/ably/realtime/connection.rb index a99354e4..320ba88e 100644 --- a/lib/ably/realtime/connection.rb +++ b/lib/ably/realtime/connection.rb @@ -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