Skip to content

Conversation

@BHandle
Copy link

@BHandle BHandle commented Jan 24, 2025

This modifies the disconnect behavior of a Client in the following ways:

  • adds a WhenDisconnected event that allows the creator to react to the Server closing.
  • KeepAlive pings are stopped, rather than only stopping if a disconnect message is sent to the Server.
  • An Exception is prevented if Disconnect is called when the Connect did not succeed. (also required if the last bullet is accepted)
  • A KeepAlive ping failure is caught and treated as a Server disconnect, rather than bubbling the exception on the Timer.

@BHandle
Copy link
Author

BHandle commented Jan 24, 2025

When creating this, I did not personally use the encrypted or stateful variants, and I haven't echoed any changes to those implementations. It's possible that these changes should also be performed there to keep each of them in sync.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant