fixes all S3 operations failing with:
`2021-11-15T15:46:05.992+0000
7ffee17fa700 20 failed to read header: Bad file descriptor`
when `--rgw_frontends="beast port=8000 request_timeout_ms=0"`
Signed-off-by: Mark Kogan <mkogan@redhat.com>
basic_timeout_timer& operator=(const basic_timeout_timer&) = delete;
void start() {
- timer.expires_after(dur);
- timer.async_wait(timeout_handler{stream});
+ if (dur.count() > 0) {
+ timer.expires_after(dur);
+ timer.async_wait(timeout_handler{stream});
+ }
}
void cancel() {
- timer.cancel();
+ if (dur.count() > 0) {
+ timer.cancel();
+ }
}
private: