lib/submodules/ably-ruby/lib/ably/realtime/channel/channel_manager.rb in ably-rest-1.1.6 vs lib/submodules/ably-ruby/lib/ably/realtime/channel/channel_manager.rb in ably-rest-1.1.7
- old
+ new
@@ -61,10 +61,12 @@
if protocol_message.error
channel.set_channel_error_reason protocol_message.error
log_channel_error protocol_message.error
end
+ channel.properties.set_attach_serial(protocol_message.channel_serial)
+
if protocol_message.has_channel_resumed_flag?
logger.debug { "ChannelManager: Additional resumed ATTACHED message received for #{channel.state} channel '#{channel.name}'" }
else
channel.emit :update, Ably::Models::ChannelStateChange.new(
current: channel.state,
@@ -73,11 +75,9 @@
reason: protocol_message.error,
resumed: false,
)
update_presence_sync_state_following_attached protocol_message
end
-
- channel.properties.set_attach_serial(protocol_message.channel_serial)
end
# Handle DETACED messages, see #RTL13 for server-initated detaches
def detached_received(reason)
case channel.state.to_sym