If dnslisten_readcb gets a read callback it needs to verify that the
outer socket wasn't closed in the meantime, and issue a CANCELED callback
if it was.
(cherry picked from commit
3ab3d90de039a3f086bba9c25792e42dd1b4a614)
REQUIRE(VALID_NMSOCK(dnssock));
REQUIRE(dnssock->tid == isc_nm_tid());
REQUIRE(VALID_NMHANDLE(handle));
+ if (eresult == ISC_R_SUCCESS &&
+ (!isc__nmsocket_active(dnssock) || dnssock->outerhandle == NULL))
+ {
+ eresult = ISC_R_CANCELED;
+ }
if (region == NULL || eresult != ISC_R_SUCCESS) {
/* Connection closed */