Fix polling of socket with negative timeout (when poll() interrupted by EINTR)

In case of EINTR the timeout will be adjusted, but this should not be
done in case of negative timeout since it means infinite timeout, and
in that adjustment block negative timeout will be reset to 0, which will
make poll() return (since zero timeout means return immediatelly even if
no fd is ready).

This should also fix 02127_connection_drain flap on CI [1].

  [1]: https://s3.amazonaws.com/clickhouse-test-reports/32928/ddd5bebe555ce8feebcdd339e47fc45184c20dd1/stateless_tests__release__wide_parts_enabled__actions_.html

Refs: https://github.com/ClickHouse/poco/pull/55
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This commit is contained in:
Azat Khuzhin 2022-03-30 18:13:01 +03:00
parent 44293e6f94
commit 4cd159746e

2
contrib/poco vendored

@ -1 +1 @@
Subproject commit 520a90e02e3e5cb90afeae1846d161dbc508a6f1
Subproject commit 008b16469471d55b176db181756c94e3f14dd2dc