Skip to content

Commit

Permalink
implemented RTN8c and RTN9c for resetting resume info
Browse files Browse the repository at this point in the history
  • Loading branch information
sacOO7 committed Jun 3, 2024
1 parent 599b840 commit 2588b9f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/ably/realtime/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ def configure_new(connection_id, connection_key)
# @api private
def reset_resume_info
@key = nil
@id = nil
end

# @!attribute [r] __outgoing_protocol_msgbus__
Expand Down
3 changes: 2 additions & 1 deletion lib/ably/realtime/connection/connection_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ def initialize(connection)
@connection = connection
@timers = Hash.new { |hash, key| hash[key] = [] }

connection.unsafe_on(:closed) do
# RTN8c, RTN9c
connection.unsafe_on(:closing, :closed, :suspended, :failed) do
connection.reset_resume_info
end

Expand Down

0 comments on commit 2588b9f

Please sign in to comment.