Skip to content

Commit

Permalink
Fixed request_attach, set attaching state first, then send attach pro…
Browse files Browse the repository at this point in the history
…to msg
  • Loading branch information
sacOO7 committed Jul 3, 2024
1 parent ce628e7 commit 0af9002
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ably/realtime/channel/channel_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ def log_channel_error(error)
# @param reason
# @option options [Ably::Models::ErrorInfo] :reason
def request_reattach(reason = nil)
send_attach_protocol_message
logger.debug { "Explicit channel reattach request sent to Ably due to #{reason}" }
channel.set_channel_error_reason(reason) if reason
channel.transition_state_machine! :attaching, reason: reason unless channel.attaching?
send_attach_protocol_message
logger.debug { "Explicit channel reattach request sent to Ably due to #{reason}" }
end

def duplicate_attached_received(protocol_message)
Expand Down

0 comments on commit 0af9002

Please sign in to comment.