lib/ably/realtime/channel/channel_state_machine.rb in ably-1.1.8 vs lib/ably/realtime/channel/channel_state_machine.rb in ably-1.2.0
- old
+ new
@@ -40,9 +40,14 @@
channel.manager.attach
end
before_transition(to: [:attached]) do |channel, current_transition|
channel.manager.attached current_transition.metadata.protocol_message
+ channel.attach_resume!
+ end
+
+ before_transition(to: [:detaching, :failed]) do |channel, _current_transition|
+ channel.reset_attach_resume!
end
after_transition(to: [:detaching]) do |channel, current_transition|
err = error_from_state_change(current_transition)
channel.manager.detach err, current_transition.metadata.previous