2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

Fix netmgr read/connect timeout issues

- don't bother closing sockets that are already closing.
- UDP read timeout timer was not stopped after reading.
- improve handling of TCP connection failures.
This commit is contained in:
Ondřej Surý
2020-10-26 14:19:37 +01:00
committed by Ondřej Surý
parent 7a6056bc8f
commit cdccac4993
4 changed files with 86 additions and 60 deletions

View File

@@ -1612,14 +1612,21 @@ isc__nm_async_detach(isc__networker_t *worker, isc__netievent_t *ev0) {
static void
shutdown_walk_cb(uv_handle_t *handle, void *arg) {
isc_nmsocket_t *sock = uv_handle_get_data(handle);
UNUSED(arg);
if (uv_is_closing(handle)) {
return;
}
switch (handle->type) {
case UV_UDP:
isc__nm_udp_shutdown(uv_handle_get_data(handle));
REQUIRE(VALID_NMSOCK(sock));
isc__nm_udp_shutdown(sock);
break;
case UV_TCP:
isc__nm_tcp_shutdown(uv_handle_get_data(handle));
REQUIRE(VALID_NMSOCK(sock));
isc__nm_tcp_shutdown(sock);
break;
default:
break;