summaryrefslogtreecommitdiff
path: root/src/ext/eventdns.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ext/eventdns.c')
-rw-r--r--src/ext/eventdns.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ext/eventdns.c b/src/ext/eventdns.c
index 3ee9f72459..66280cccdb 100644
--- a/src/ext/eventdns.c
+++ b/src/ext/eventdns.c
@@ -2306,7 +2306,12 @@ _evdns_nameserver_add_impl(const struct sockaddr *address,
ioctlsocket(ns->socket, FIONBIO, &nonblocking);
}
#else
- fcntl(ns->socket, F_SETFL, O_NONBLOCK);
+ if (fcntl(ns->socket, F_SETFL, O_NONBLOCK) == -1) {
+ evdns_log(EVDNS_LOG_WARN, "Error %s (%d) while settings file status flags.",
+ tor_socket_strerror(errno), errno);
+ err = 2;
+ goto out2;
+ }
#endif
if (global_bind_addr_is_set &&