aboutsummaryrefslogtreecommitdiff
path: root/resolv/res_send.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2024-07-24 12:06:47 +0200
committerFlorian Weimer <fweimer@redhat.com>2024-07-24 14:08:04 +0200
commit3da1b0064a6f730492340797c211d5fcd0a795bc (patch)
tree16af7ed07c3d21611edbd3ad5fdd14b188dbdc05 /resolv/res_send.c
parent40a1e1798b2414c6ab32244b8cb03c2c39940b71 (diff)
downloadglibc-3da1b0064a6f730492340797c211d5fcd0a795bc.zip
glibc-3da1b0064a6f730492340797c211d5fcd0a795bc.tar.gz
glibc-3da1b0064a6f730492340797c211d5fcd0a795bc.tar.bz2
resolv: Do not wait for non-existing second DNS response after error (bug 30081)
In single-request mode, there is no second response after an error because the second query has not been sent yet. Waiting for it introduces an unnecessary timeout. Reviewed-by: DJ Delorie <dj@redhat.com> (cherry picked from commit af625987d619388a100b153520d3ee308bda9889)
Diffstat (limited to 'resolv/res_send.c')
-rw-r--r--resolv/res_send.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/resolv/res_send.c b/resolv/res_send.c
index bf4ce67..b741b42 100644
--- a/resolv/res_send.c
+++ b/resolv/res_send.c
@@ -1236,7 +1236,7 @@ send_dg(res_state statp,
*resplen2 = 0;
return resplen;
}
- if (buf2 != NULL)
+ if (buf2 != NULL && !single_request)
{
/* No data from the first reply. */
resplen = 0;