Post

Our Hysteria2 connections died about 60 seconds into every upload speed test. DNS kept working, web traffic didn't. The cause was a QUIC flow-control stall in the Hysteria server. We fixed it with about 37 lines of Go. 🧵

A speed-test server stops reading its upload but keeps the connection open. The unread data fills the connection's 20 MB flow-control window, so no stream can send anymore, not even new requests. UDP isn't flow-controlled, so everything looked healthy.

The fix: if a write to the target makes no progress for 10 s, close it and release the window. Lab: the official server never recovers, the patched one in 7.8 s. On a phone: 4 speed tests over 160 s, no stall. Live on our servers, no app update needed.

No replies yet.