-
-
Save jgajek/6028343f0cf90d0a6bc3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (n == 0) { | |
Dprint(statp->options & RES_DEBUG, (stdout, ";; timeout\n")); | |
if (resplen > 1 && (recvresp1 || (buf2 != NULL && recvresp2))) | |
{ | |
/* There are quite a few broken name servers out | |
there which don't handle two outstanding | |
requests from the same source. There are also | |
broken firewall settings. If we time out after | |
having received one answer switch to the mode | |
where we send the second request only once we | |
have received the first answer. */ | |
if (!single_request) | |
{ | |
statp->options |= RES_SNGLKUP; | |
single_request = true; | |
*gotsomewhere = save_gotsomewhere; | |
goto retry; | |
} | |
else if (!single_request_reopen) | |
{ | |
statp->options |= RES_SNGLKUPREOP; | |
single_request_reopen = true; | |
*gotsomewhere = save_gotsomewhere; | |
__res_iclose (statp, false); | |
goto retry_reopen; | |
} | |
*resplen2 = 1; | |
return resplen; | |
} | |
*gotsomewhere = 1; | |
return (0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment