Skip to content

Conversation

@blast-hardcheese
Copy link
Contributor

Why

We're seeing some connectivity issues using the river v2 client. Scrutinizing codepaths, there were some missed cases

What changed

  • _recv_from_ws should catch all exceptions inside the loop instead of terminating early and never restarting
  • Differentiate between ConnectionClosedOK and ConnectionClosed in exception handlers. If we close on purpose, don't initiate reconnect
  • session.close() should block all callers until we are down, instead of just the initiating caller.

Test plan

CI/CD

@blast-hardcheese blast-hardcheese requested a review from a team as a code owner April 27, 2025 19:53
@blast-hardcheese blast-hardcheese requested review from cbrewster and jackyzha0 and removed request for a team April 27, 2025 19:53
@blast-hardcheese blast-hardcheese merged commit 177cf27 into main Apr 28, 2025
3 checks passed
@blast-hardcheese blast-hardcheese deleted the dstewart/bug/session-lifecycle branch April 28, 2025 19:55
@blast-hardcheese blast-hardcheese added the bug Something isn't working label Apr 28, 2025
Copy link
Member

@jackyzha0 jackyzha0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

commented irl re: assigning self._terminating_task, rest lgtm!

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.

4 participants