]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Don't detach self until we're closing wpk-netmgr-refcount
authorWitold Kręcicki <wpk@isc.org>
Tue, 9 Jun 2020 21:26:22 +0000 (23:26 +0200)
committerWitold Kręcicki <wpk@isc.org>
Thu, 18 Jun 2020 08:04:10 +0000 (10:04 +0200)
lib/isc/netmgr/tcpdns.c

index fa63be24942dd6c2d44e7a72440c120091597afb..21a3d31507830f695c80ffe79df3a38cff2b1c04 100644 (file)
@@ -94,9 +94,9 @@ dnstcp_readtimeout(uv_timer_t *timer) {
 
        REQUIRE(VALID_NMSOCK(sock));
        REQUIRE(sock->tid == isc_nm_tid());
-       if (sock->self != NULL) {
-               isc__nmsocket_detach(&sock->self);
-       };
+       /* Close the TCP connection, it's closing should fire 'our' closing */
+       isc_nmhandle_unref(sock->outerhandle);
+       sock->outerhandle = NULL;
 }
 
 /*