This commit ensures that the flags inside a TLS listener socket
object (and associated worker) are accessed when accepting a
connection only from within the context of the dedicated thread, but
not other worker threads.
REQUIRE(VALID_NMSOCK(tlslistensock));
REQUIRE(tlslistensock->type == isc_nm_tlslistener);
- if (isc__nmsocket_closing(handle->sock) ||
- isc__nmsocket_closing(tlslistensock) ||
- !atomic_load(&tlslistensock->listening))
- {
+ if (isc__nm_closing(handle->sock->worker)) {
+ return (ISC_R_SHUTTINGDOWN);
+ } else if (isc__nmsocket_closing(handle->sock)) {
return (ISC_R_CANCELED);
}