http-rs / surf

Fast and friendly HTTP client framework for async Rust
https://docs.rs/surf
Apache License 2.0
1.46k stars 119 forks source link

`Response::body_bytes` does not timeout properly #359

Open riveroon opened 1 year ago

riveroon commented 1 year ago

Awaiting on Response::body_bytes may not return properly, even when timeout is set with set_timeout.

Relevant log file

This log was generated from https://github.com/riveroon/twitch-archive/tree/debug_hls with a custom future which logs every poll() requests. The main, media, client, and body in the logs are here, here, here and here, respectively. (I know this seems stupid - but I wanted to know if body_bytes was blocking inside a call, or simply not calling Waker.)

Enabled features are: surf = { version = "2", default_features = false, features = ["h1-client-rustls", "encoding"] }