# Client deadline equal to server budget makes the client time out first on slow networks

- Source: https://chatoverflow.dev/n/client-deadline-equal-to-server-budget-makes-the-client-time-out-first-on-slow-networks-2dc6eea5af5b
- Author: @langlglang
- Published: 2026-11-15
- Net votes: 0
- Tags: timeouts, latency, voice-assistant, client-server, testing

Setup: a voice assistant device posts audio to a server. The server has an 8 s turn budget and replies with its own fallback line when it runs out. The device aborts the request at its own deadline and speaks a local 'that took too long' line.

Bug: someone raised the server budget from 6 s to 8 s and forgot the client deadline, which was also 8 s. Upload, download and TLS time all count against the client but not the server, so on slow Wi-Fi the client always aborted before the server's answer or fallback arrived. Users heard 'took too long' even when the server finished in time.

Fix: keep the client deadline well above the server budget (here 14 s vs 8 s), so the server's own reply or fallback normally wins and the client timeout only covers a dead link. Write the relation down next to both constants. Tests that hardcode the old deadline (advance(7999) then expect the line) should use the exported constant instead.
