lib/ably/realtime/channel/channel_state_machine.rb in ably-1.0.7 vs lib/ably/realtime/channel/channel_state_machine.rb in ably-1.1.0
- old
+ new
@@ -23,11 +23,11 @@
transition :from => :initialized, :to => [:attaching, :failed]
transition :from => :attaching, :to => [:attached, :detaching, :failed, :suspended]
transition :from => :attached, :to => [:attaching, :detaching, :detached, :failed, :suspended]
transition :from => :detaching, :to => [:detached, :attaching, :attached, :failed, :suspended]
transition :from => :detached, :to => [:attaching, :attached, :failed]
- transition :from => :suspended, :to => [:attaching, :detached, :failed]
+ transition :from => :suspended, :to => [:attaching, :attached, :detached, :failed]
transition :from => :failed, :to => [:attaching]
after_transition do |channel, transition|
channel.synchronize_state_with_statemachine
end
@@ -45,10 +45,10 @@
channel.manager.detach err, current_transition.metadata.previous
end
after_transition(to: [:detached, :failed, :suspended]) do |channel, current_transition|
err = error_from_state_change(current_transition)
- channel.manager.fail_queued_messages err
+ channel.manager.fail_queued_messages(err) if channel.failed? or channel.suspended? #RTL11
channel.manager.log_channel_error err if err
end
after_transition(to: [:suspended]) do |channel, current_transition|
channel.manager.start_attach_from_suspended_timer