Repository navigation
Conversation
nkaradzhov
approved these changes
Oct 23, 2026
nkaradzhov
left a comment
Collaborator
There was a problem hiding this comment.
@jakobzach thanks, somehow i missed the previous comment. LGTM
Collaborator
|
Should we merge this? |
This branch has not been deployed
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.
Description
Follow-up to #3499 and the ChatGPT/Codex finding.
If a
reconnectingcallback destroys the client or closes it with an empty queue, the socket currently starts another connection after the callback returns. That attempt captures the already-incremented teardown epoch and can revive the closed client.Snapshot the teardown epoch before emitting
reconnectingand stop if the callback changed it. Gracefulclose()with queued commands still connects and drains normally.@nkaradzhov this uses the small post-callback check proposed in the previous review thread. The production change is two lines.
Validation
destroy()and empty-queueclose()insidereconnecting) fail on unmodified upstream1fd0e5f83aand pass with the fix.npm testwas attempted on Node 22.23.2 with Docker Desktop. Stopped after three container-readiness hooks timed out: Redis answeredPINGinside its container, but host connections to the test port were refused on both IPv4 and IPv6. The harness uses--network host; full-suite validation remains blocked by local Docker networking.Checklist
npm testpass with this change (including linting)?