check if socket is still disconnecting and allow connect#6110
Merged
check if socket is still disconnecting and allow connect#6110
Conversation
SteffenDE
added a commit
that referenced
this pull request
Mar 27, 2025
* check if socket is still disconnecting and allow connect Fixes #6103. * check connectClock in teardown
clarkware
pushed a commit
to clarkware/phoenix
that referenced
this pull request
Apr 18, 2025
…ework#6110) * check if socket is still disconnecting and allow connect Fixes phoenixframework#6103. * check connectClock in teardown
SteffenDE
added a commit
that referenced
this pull request
Feb 18, 2026
Closes #6600. Closes #6599. In #6110 I added a check to prevent teardown from continuing if there was a new connection attempt in between. While this solved the reported issue (#6103), it also means that in case someone calls connect or disconnect in between the original teardown call and the waitForBufferDone, we would not actually close the original connection, leaving dangling connections. The fix is to always use the original connection that was supposed to be closed in teardown and the subsequent checks and only set this.conn to null when it is still the same object. Co-Authored-By: satoren <satoreyo@hotmail.com>
SteffenDE
added a commit
that referenced
this pull request
Feb 21, 2026
Closes #6600. Closes #6599. In #6110 I added a check to prevent teardown from continuing if there was a new connection attempt in between. While this solved the reported issue (#6103), it also means that in case someone calls connect or disconnect in between the original teardown call and the waitForBufferDone, we would not actually close the original connection, leaving dangling connections. The fix is to always use the original connection that was supposed to be closed in teardown and the subsequent checks and only set this.conn to null when it is still the same object. Co-authored-by: satoren <satoreyo@hotmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #6103.
Disclaimer: I did not test this!