From e8e7ec7d5d7f3658ad4c9f547454975fcc87115f Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Tue, 21 May 2024 20:06:07 +0530 Subject: [PATCH] Added spec comment and logging message while setting channel serial --- lib/ably/realtime/client/incoming_message_dispatcher.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ably/realtime/client/incoming_message_dispatcher.rb b/lib/ably/realtime/client/incoming_message_dispatcher.rb index d48be0b9..bbd60375 100644 --- a/lib/ably/realtime/client/incoming_message_dispatcher.rb +++ b/lib/ably/realtime/client/incoming_message_dispatcher.rb @@ -38,7 +38,7 @@ def logger def dispatch_protocol_message(*args) protocol_message = args.first - + # RTL15b unless protocol_message.nil? if protocol_message.has_message_serial? && ( @@ -46,6 +46,9 @@ def dispatch_protocol_message(*args) protocol_message.action == :presence || protocol_message.action == :attached ) + + logger.info "Setting channel serial for #{channel.name}" + logger.info "Previous serial #{channel.name}, new serial #{protocol_message.channel_serial}" get_channel(protocol_message.channel).tap do |channel| channel.properties.channel_serial = protocol_message.channel_serial end