sozu-proxy / sozu

Sōzu HTTP reverse proxy, configurable at runtime, fast and safe, built in Rust. It is awesome!
https://www.sozu.io/
GNU Affero General Public License v3.0
3.01k stars 187 forks source link

channel: fix timeout issue #1059

Closed Keksoj closed 8 months ago

Keksoj commented 8 months ago

Because of the way the Channel::read_message_blocking_timeout was written, the reading on the socket is blocking, and the provided timeout is ignored.

This PR introduces a Channel::set_read_timeout method and uses it to perform a read every 10 ms and check the provided timeout inbetween each try.