There was an error while loading. Please reload this page.
1 parent 99efbbf commit eb3dec2Copy full SHA for eb3dec2
1 file changed
src/client/layer/timeout/body.rs
@@ -206,9 +206,10 @@ where
206
) -> Poll<Option<Result<http_body::Frame<Self::Data>, Self::Error>>> {
207
let mut this = self.project();
208
209
- // Error if the timeout has expired.
+ // Start the timeout on the first poll.
210
if this.sleep.is_none() {
211
- this.sleep.set(Some(this.timer.sleep(*this.timeout)));
+ let deadline = this.timer.now() + *this.timeout;
212
+ this.sleep.set(Some(this.timer.sleep_until(deadline)));
213
}
214
215
// Error if the timeout has expired.
0 commit comments