From 050258bda4a45faf18baaf3879a9da160d2230fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Fri, 6 Nov 2020 13:11:08 +0100 Subject: [PATCH] netmgr: Always load the result from async socket Because we use result earlier for setting the loadbalancing on the socket, we could be left with a ISC_R_NOTIMPLEMENTED value stored in the variable and when the UDP connection would succeed, we would errorneously return this value instead of ISC_R_SUCCESS. --- lib/isc/netmgr/udp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/isc/netmgr/udp.c b/lib/isc/netmgr/udp.c index aa058ce06d..05e490a6f2 100644 --- a/lib/isc/netmgr/udp.c +++ b/lib/isc/netmgr/udp.c @@ -841,9 +841,7 @@ isc_nm_udpconnect(isc_nm_t *mgr, isc_nmiface_t *local, isc_nmiface_t *peer, isc__nm_uvreq_put(&req, sock); } - if (atomic_load(&sock->result) != ISC_R_SUCCESS) { - result = atomic_load(&sock->result); - } + result = atomic_load(&sock->result); isc__nmsocket_detach(&tmp);