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.
This commit is contained in:
Artem Boldariev 2022-05-10 19:44:28 +03:00
parent aa8c258fba
commit 245f7cec2e

View file

@ -2033,6 +2033,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;