diff options
-rw-r--r-- | src/network/res_msend.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/res_msend.c b/src/network/res_msend.c index fef7e3a..2643be2 100644 --- a/src/network/res_msend.c +++ b/src/network/res_msend.c @@ -287,7 +287,7 @@ int __res_msend_rc(int nqueries, const unsigned char *const *queries, }; step_mh(&mh, apos[i]); r = recvmsg(pfd[i].fd, &mh, 0); - if (r < 0) goto out; + if (r <= 0) goto out; apos[i] += r; if (apos[i] < 2) continue; int alen = alen_buf[i][0]*256 + alen_buf[i][1]; |