Skip to content

Send client heartbeast on a write timer - #254

Draft
spuun wants to merge 2 commits into
mainfrom
downstream-heartbeats
Draft

Send client heartbeast on a write timer#254
spuun wants to merge 2 commits into
mainfrom
downstream-heartbeats

Conversation

@spuun

@spuun spuun commented Sep 8, 2026

Copy link
Copy Markdown
Member

Fixes #253

Client#read_loop set read_timeout to heartbeat/2 and sent a heartbeat whenever that read timed out, so the proxy only spoke to a client after a period of complete inbound silence. AMQP wants the opposite: a heartbeat when nothing has been written for heartbeat/2. Any frame from the client reset the timer, so a busy client with nothing to deliver got none at all and hit its MissedHeartbeatException grace.

The read timeout doubled as the heartbeat timer, so any frame from the
client reset it and a client that kept sending frames itself never got
one back. Also wait the full two intervals before closing a connection.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant