diff options
-rw-r--r-- | libc/inet/resolv.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c index fffe4281c..8e5a97db0 100644 --- a/libc/inet/resolv.c +++ b/libc/inet/resolv.c @@ -1410,6 +1410,10 @@ int __dns_lookup(const char *name, * to next nameserver */ goto try_next_server; } + if (fds.revents & (POLLERR | POLLHUP | POLLNVAL)) { + DPRINTF("Bad event\n"); + goto try_next_server; + } /*TODO: better timeout accounting?*/ reply_timeout -= 1000; #endif /* USE_SELECT */ |