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

issue 'closetcp' trace message only if a TCP connection

was actually open
This commit is contained in:
Andreas Gustafsson
2000-04-20 17:07:46 +00:00
parent 06fd648cf2
commit 8378b720cd

View File

@@ -367,7 +367,6 @@ exit_check(ns_client_t *client) {
* if any.
*/
INSIST(client->newstate <= NS_CLIENTSTATE_READY);
CTRACE("closetcp");
if (client->nreads > 0)
dns_tcpmsg_cancelread(&client->tcpmsg);
if (! client->nreads == 0) {
@@ -379,8 +378,10 @@ exit_check(ns_client_t *client) {
dns_tcpmsg_invalidate(&client->tcpmsg);
client->tcpmsg_valid = ISC_FALSE;
}
if (client->tcpsocket != NULL)
if (client->tcpsocket != NULL) {
CTRACE("closetcp");
isc_socket_detach(&client->tcpsocket);
}
if (client->tcpquota != NULL)
isc_quota_detach(&client->tcpquota);