SIGN IN SIGN UP

fix(realtime): retain configured queues without replaying attempted sends (#3978)

An empty Realtime manager queue was replaced on connect, losing its
configured byte limit and later messages. A typed or queued send could
also be replayed on reconnect even after reaching the server. Preserve
the manager's queue and release only attempted writes on failure or
cancellation; never-attempted messages remain in order. Other endpoints
retain the shared queue's existing defaults.

Six sync/async real-socket regressions fail on the base and pass with
this change, covering empty queues and interrupted pre-open/direct
sends. A focused cancellation regression verifies in-flight bounds and
retained messages. Validation: 456 affected tests per Pydantic 1/2, 45
final queue/Realtime tests per version, Ruff, mypy (1,865 files),
Pyright, and the trusted custom-code check (7,766/10,000).
M
Mark Stuart committed
a52805c2537422ad602eba2bf66072880ea3fd22
Parent: a444e42
Committed by GitHub <noreply@github.com> on 9/28/2026, 1:25:42 PM