Skip to content

Commit

Permalink
Added spec comment and logging message while setting channel serial
Browse files Browse the repository at this point in the history
  • Loading branch information
sacOO7 committed May 21, 2024
1 parent d36aafb commit e8e7ec7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/ably/realtime/client/incoming_message_dispatcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,17 @@ def logger

def dispatch_protocol_message(*args)
protocol_message = args.first

# RTL15b
unless protocol_message.nil?
if protocol_message.has_message_serial? &&
(
protocol_message.action == :message ||
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
Expand Down

0 comments on commit e8e7ec7

Please sign in to comment.