mirror of
https://github.com/isc-projects/bind9.git
synced 2026-02-17 09:39:15 -05:00
dighost.c: don't call check_if_done() twice successively
The check_if_done() function can pass control back out to dighost_shutdown() (which is part of dig.c, host.c, or nslookup.c), and calling that twice can cause unexpected problems, if it is not designed to be idempotent. Since cancel_lookup() calls check_if_done() implicitly, don't call check_if_done() again when 'next' is NULL.
This commit is contained in:
parent
ad6713f2ae
commit
e4604b71d2
1 changed files with 2 additions and 2 deletions
|
|
@ -3212,11 +3212,11 @@ udp_ready(isc_nmhandle_t *handle, isc_result_t eresult, void *arg) {
|
|||
|
||||
if (next != NULL) {
|
||||
start_udp(next);
|
||||
check_if_done();
|
||||
} else {
|
||||
clear_current_lookup();
|
||||
}
|
||||
|
||||
check_if_done();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -3609,11 +3609,11 @@ tcp_connected(isc_nmhandle_t *handle, isc_result_t eresult, void *arg) {
|
|||
|
||||
if (next != NULL) {
|
||||
start_tcp(next);
|
||||
check_if_done();
|
||||
} else {
|
||||
clear_current_lookup();
|
||||
}
|
||||
|
||||
check_if_done();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue