Skip to content

Fix websocket reliability and auth handling after websockets upgrade - #13

Merged
ZacheryThomas merged 3 commits into
ZacheryThomas:mainfrom
anthonymkz:main
Oct 13, 2025
Merged

Fix websocket reliability and auth handling after websockets upgrade#13
ZacheryThomas merged 3 commits into
ZacheryThomas:mainfrom
anthonymkz:main

Conversation

@anthonymkz

Copy link
Copy Markdown
Contributor

When upgrading the SmartRent library to a newer websockets release, I began seeing frequent websocket timeouts and 403 errors This PR improves connection stability and command reliability by:

  1. Passing Authorization headers on all websocket connections (streaming and commands)
  2. Refreshing tokens and retrying once on 403 responses
  3. Adding heartbeat (ping/pong) and jittered reconnect backoff to reduce dropped sessions

Fix SmartRent websocket auth handling
Add Authorization headers to both streaming and command websockets
Refresh token and retry once on 403 InvalidStatus
Keep heartbeat and jittered backoff for stability
@anthonymkz
anthonymkz marked this pull request as ready for review September 20, 2025 20:37
@ZacheryThomas
ZacheryThomas merged commit 1adffbe into ZacheryThomas:main Oct 13, 2025
0 of 2 checks passed
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.

2 participants