Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't report connection still alive after close without Client.disconnect #194

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

CodeTriangle
Copy link

Currently, closing the connection through any means other than calling the function Client.disconnect (i.e. computer suspending, server dying) would cause AP.js's state machine to still report that it was connected to the server. This fixes that by moving much of the deinitialization logic in Client.disconnect to a new disconnection listener which is established in Client.#finalizeConnection (so that it only gets called for fully initialized socket data).

…nect

previously, due to an oversight, closing the connection through a means
other than calling the function Client.disconnect (i.e. computer
suspending, server dying) would cause AP.js's state machine to still report
that it was connected to the server. This fixes that by moving much of
the deinitialization logic in Client.disconnect to a new disconnection
listener which is established in Client.#finalizeConnection (so that it
only gets called when the stuff we want to deinitialize is definitely
present.
@ThePhar ThePhar changed the base branch from main to legacy November 4, 2024 12:45
@ThePhar ThePhar self-assigned this Nov 4, 2024
@ThePhar ThePhar added the is: bug Something isn't working label Nov 4, 2024
@ThePhar ThePhar added this to the 1.2 Legacy Release milestone Nov 4, 2024
@ThePhar ThePhar merged commit c9156d6 into ThePhar:legacy Nov 4, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects: legacy Targetting [email protected] is: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants