diff --git a/lib/ably/models/protocol_message.rb b/lib/ably/models/protocol_message.rb index 19f8f1e6..0088fded 100644 --- a/lib/ably/models/protocol_message.rb +++ b/lib/ably/models/protocol_message.rb @@ -274,6 +274,7 @@ def to_s end # True if the ProtocolMessage appears to be invalid, however this is not a guarantee + # Used for validating incoming protocol messages, so no need to add unnecessary checks # @return [Boolean] # @api private def invalid? diff --git a/lib/ably/realtime/channels.rb b/lib/ably/realtime/channels.rb index feb47005..e7cf788d 100644 --- a/lib/ably/realtime/channels.rb +++ b/lib/ably/realtime/channels.rb @@ -52,7 +52,7 @@ def release(channel) # @api private def set_channel_serials(serials) serials.each do |channel_name, channel_serial| - self[channel_name].properties.channel_serial = channel_serial + get(channel_name).properties.channel_serial = channel_serial end end diff --git a/lib/ably/realtime/client/incoming_message_dispatcher.rb b/lib/ably/realtime/client/incoming_message_dispatcher.rb index f625983d..596c558b 100644 --- a/lib/ably/realtime/client/incoming_message_dispatcher.rb +++ b/lib/ably/realtime/client/incoming_message_dispatcher.rb @@ -47,8 +47,8 @@ def dispatch_protocol_message(*args) protocol_message.action == :attached ) get_channel(protocol_message.channel).tap do |channel| - logger.info "Setting channel serial for channel #{channel.name}" - logger.info "Previous serial #{channel.properties.channel_serial}, new serial #{protocol_message.channel_serial}" + logger.info "Setting channel serial for channel #{channel.name}, " << + "Previous: #{channel.properties.channel_serial}, New: #{protocol_message.channel_serial}" channel.properties.channel_serial = protocol_message.channel_serial end end