The old code didn't handle race conditions and errors on systems
with non load balancing sockets gracefully. Look for an error on
any child socket and if found close all the child sockets and return
an error.
isc__nm_closesocket(fd);
}
+ /*
+ * If any of the child sockets have failed then isc_nm_listenudp
+ * fails.
+ */
for (size_t i = 1; i < sock->nchildren; i++) {
- INSIST(result == sock->children[i].result);
+ if (result == ISC_R_SUCCESS &&
+ sock->children[i].result != ISC_R_SUCCESS)
+ {
+ result = sock->children[i].result;
+ }
}
atomic_store(&sock->active, true);