mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
detach unfinished query when canceling
when a query was canceled while still in the process of connecting, tcp_connected() and udp_ready() didn't detach the query object.
This commit is contained in:
@@ -3097,6 +3097,7 @@ udp_ready(isc_nmhandle_t *handle, isc_result_t eresult, void *arg) {
|
|||||||
query->started = true;
|
query->started = true;
|
||||||
|
|
||||||
if (atomic_load(&cancel_now)) {
|
if (atomic_load(&cancel_now)) {
|
||||||
|
query_detach(&query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3452,6 +3453,7 @@ tcp_connected(isc_nmhandle_t *handle, isc_result_t eresult, void *arg) {
|
|||||||
query->started = true;
|
query->started = true;
|
||||||
|
|
||||||
if (atomic_load(&cancel_now)) {
|
if (atomic_load(&cancel_now)) {
|
||||||
|
query_detach(&query);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user