Avoid aborting when uv_timer_start() is used on a closing socket

In such a case it will return UV_EINVAL (-EINVAL), leading to
aborting, as the code expects the function to succeed.

(cherry picked from commit 245f7cec2e)
This commit is contained in:
Artem Boldariev 2022-05-10 19:44:28 +03:00
parent 3393ec19c2
commit cb6591f277

View file

@ -2077,6 +2077,10 @@ void
isc__nmsocket_timer_restart(isc_nmsocket_t *sock) {
REQUIRE(VALID_NMSOCK(sock));
if (uv_is_closing((uv_handle_t *)&sock->read_timer)) {
return;
}
if (atomic_load(&sock->connecting)) {
int r;