mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-19 22:49:53 -04:00
Reset dig exit code after a TCP connection is established
The "exitcode" variable is set to 9 if a TCP connection fails, but is
not reset to 0 if a subsequent TCP connection succeeds. This causes dig
to return a non-zero exit code if it succeeds in getting a TCP response
after a retry. Fix by resetting "exitcode" to 0 if connect_done()
receives an event with the "result" field set to ISC_R_SUCCESS.
(cherry picked from commit deb3b85cb2)
This commit is contained in:
parent
9e44e320c5
commit
bfdeac09af
1 changed files with 1 additions and 0 deletions
|
|
@ -3526,6 +3526,7 @@ connect_done(isc_task_t *task, isc_event_t *event) {
|
|||
UNLOCK_LOOKUP;
|
||||
return;
|
||||
}
|
||||
exitcode = 0;
|
||||
if (keep_open) {
|
||||
if (keep != NULL)
|
||||
isc_socket_detach(&keep);
|
||||
|
|
|
|||
Loading…
Reference in a new issue