Skip to content

Conversation

@PythonFZ
Copy link
Member

TODO: fix / check tests

Add connect_error handler in SocketManager that re-registers users when the server rejects connection with "User not found" error. This happens when the server restarts and Redis data is cleared - the client's JWT token is still valid but the user no longer exists in Redis.

The handler:

  • Detects "User not found" errors during reconnection
  • Re-calls api.login() to re-register the user in Redis
  • Updates the JWT token so subsequent reconnect attempts succeed

Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com

Add connect_error handler in SocketManager that re-registers users when
the server rejects connection with "User not found" error. This happens
when the server restarts and Redis data is cleared - the client's JWT
token is still valid but the user no longer exists in Redis.

The handler:
- Detects "User not found" errors during reconnection
- Re-calls api.login() to re-register the user in Redis
- Updates the JWT token so subsequent reconnect attempts succeed

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Jan 18, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov-commenter
Copy link

codecov-commenter commented Jan 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.12%. Comparing base (450bc3a) to head (0b63191).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #861      +/-   ##
==========================================
+ Coverage   80.01%   80.12%   +0.10%     
==========================================
  Files         165      166       +1     
  Lines       20131    20217      +86     
==========================================
+ Hits        16108    16198      +90     
+ Misses       4023     4019       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants