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

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.
This commit is contained in:
Ondřej Surý
2020-11-06 13:11:08 +01:00
parent 88f5f3915b
commit 050258bda4

View File

@@ -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);