In tls_error(), we now call isc__nm_tlsdns_failed_read() instead of just
stopping timer and reading from the socket. This allows us to properly
cleanup any pending operation on the socket.
switch (sock->tls.state) {
case TLS_STATE_HANDSHAKE:
case TLS_STATE_IO:
- isc__nmsocket_timer_stop(sock);
- isc__nm_stop_reading(sock);
+ isc__nm_tlsdns_failed_read_cb(sock, result);
break;
case TLS_STATE_ERROR:
return;
REQUIRE(sock->tid == isc_nm_tid());
REQUIRE(atomic_load(&sock->closing));
+ REQUIRE(sock->tls.pending_req == NULL);
+
if (sock->quota != NULL) {
isc_quota_detach(&sock->quota);
}