Logic error

This commit is contained in:
Willem Toorop 2016-07-14 15:03:47 +02:00
parent 80ea8637d1
commit 8b31ad5df1
1 changed files with 4 additions and 4 deletions

View File

@ -207,11 +207,11 @@ _getdns_cancel_reply(getdns_context *context, connection *conn)
return; return;
if (conn->l->transport == GETDNS_TRANSPORT_TCP) { if (conn->l->transport == GETDNS_TRANSPORT_TCP) {
tcp_connection *conn = (tcp_connection *)conn; tcp_connection *tcp_conn = (tcp_connection *)conn;
if (conn->to_answer > 0 && --conn->to_answer == 0 && if (tcp_conn->to_answer > 0 && --tcp_conn->to_answer == 0 &&
conn->fd == -1) tcp_conn->fd == -1)
tcp_connection_destroy(conn); tcp_connection_destroy(tcp_conn);
} else if (conn->l->transport == GETDNS_TRANSPORT_UDP && } else if (conn->l->transport == GETDNS_TRANSPORT_UDP &&
(mf = &conn->l->set->context->mf)) { (mf = &conn->l->set->context->mf)) {