lib/ably/realtime/channel/channel_state_machine.rb in ably-1.2.4 vs lib/ably/realtime/channel/channel_state_machine.rb in ably-1.2.6
- old
+ new
@@ -27,10 +27,11 @@
transition :from => :detached, :to => [:attaching, :attached, :failed]
transition :from => :suspended, :to => [:attaching, :attached, :detached, :failed]
transition :from => :failed, :to => [:attaching, :initialized]
after_transition do |channel, transition|
+ channel.manager.notify_state_change # RTL13c
channel.synchronize_state_with_statemachine
end
after_transition(to: [:initialized]) do |channel|
channel.clear_error_reason
@@ -53,9 +54,10 @@
err = error_from_state_change(current_transition)
channel.manager.detach err, current_transition.metadata.previous
end
after_transition(to: [:detached, :failed, :suspended]) do |channel, current_transition|
+ channel.properties.channel_serial = nil # RTP5a1
err = error_from_state_change(current_transition)
channel.manager.fail_queued_messages(err) if channel.failed? or channel.suspended? #RTL11
channel.manager.log_channel_error err if err
end