Improve websocket reliability per Mist best practices (#26)
* Improve websocket reliability per Mist best practices * Address PR feedback for websocket reliability changes * Tune websocket logging and metrics thread safety * fix(websockets): address review findings on reliability rework - derive ping_timeout as min(45, ping_interval - 1) when not supplied, so existing callers passing only ping_interval keep working - drain the callback queue on shutdown instead of dropping pending messages; the None sentinel now marks end-of-stream - report subscription watchdog timeouts and subscribe_failed events through on_error so callers without auto_reconnect get a signal - don't resurrect the callback worker after disconnect (stop flag is now only cleared by connect()) - cite the Mist rate-limits doc for the channel-count constants - document the new reliability kwargs in all channel class docstrings - add tests: ping derivation, worker drain, worker stop guard, watchdog expiry/cancel, subscribe_failed error reporting Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * docs(websockets): clarify ping_timeout derivation and queue_maxsize scope - note that ping_timeout falls back to 45 when ping_interval=0 (pings disabled, value unused) in the constants comment, README, and all channel class docstrings - document that queue_maxsize bounds both the receive() and callback queues in the channel class docstrings Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(websockets): reset reconnect state after subscriptions * docs(changelog): add 0.63.3 websocket reliability notes * fix: update version to 0.63.3 in pyproject.toml --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
T
Thomas Munzer committed
67b5ec288ec0fb203f2ffc440f1055485ff3b507
Parent: 92b9938
Committed by GitHub <noreply@github.com>
on 7/14/2026, 6:12:54 PM