Skip to content

Conversation

@blast-hardcheese
Copy link
Contributor

Why

When switching over to _terminating_task being authoritative, both _closing_waiter's state got out of sync and we did not actually set _terminating_task, which ensured N callbacks to close_session_callback instead of at most once.

What changed

  • Set _terminating_task
  • Rely on that instead of _closing_waiter

Test plan

test_reconnect was just a duplicate of test_connect, converting that over to handle the racing close case.

@blast-hardcheese blast-hardcheese requested a review from a team as a code owner April 28, 2025 20:22
@blast-hardcheese blast-hardcheese requested review from daweifeng-replit and removed request for a team April 28, 2025 20:22
@blast-hardcheese blast-hardcheese added the bug Something isn't working label Apr 28, 2025
@blast-hardcheese blast-hardcheese enabled auto-merge (squash) April 28, 2025 20:22
@blast-hardcheese blast-hardcheese merged commit 0deb61c into main Apr 28, 2025
3 checks passed
@blast-hardcheese blast-hardcheese deleted the dstewart/bug/session-races branch April 28, 2025 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants