szn

Bug 376 — Request/response packets dropped for behind clients

376. Render frames are droppable; replies are not

File: src/server/server.zig:2538-2544 (appendClientOut), src/server/server.zig:2265-2271 (queueToClient) Severity: MEDIUM Status: ✅ FIXED

Fix (applied)

New appendClientOutUrgent / queueToClientUrgent path queues request/response packets bypassing the behind/watermark drop while still respecting the hard cap. Display-client .command replies now use it, so a slow client’s command can no longer hang waiting for a reply that was silently discarded. Also made flushDisplayClient’s behind_count decrement saturating like its three siblings (found while testing).

Test: urgent queue delivers command reply even when client is behind — bug #376 (behind client with backlog receives backlog + reply on the wire).

Problem

The behind-client backpressure path (bug #303 lineage) drops all output, including .command responses. The issuing client then waits indefinitely on recvPacket. Distinguishing droppable render data from request/response traffic is required.

Fix (proposed)

Queue command/err/ready/exit replies onto a separate non-droppable side channel (or force a synchronous flush before responding). Test: mark a client behind, issue a command, assert the reply still arrives after the backlog clears.