aboutsummaryrefslogtreecommitdiff
path: root/ares
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2008-11-28 22:07:40 +0000
committerDan Fandrich <dan@coneharvesters.com>2008-11-28 22:07:40 +0000
commit00142d8443325a0ea48befc6c0347a065a67f1e0 (patch)
tree5fd0f42a26c7f45ad7ec0c6d8c709feffc06d972 /ares
parent1b0b7fa0e157e4c0054488932b318214fef9e345 (diff)
Only set TCP_NODELAY when it exists
Diffstat (limited to 'ares')
-rw-r--r--ares/ares_process.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ares/ares_process.c b/ares/ares_process.c
index 05341aa64..58f072595 100644
--- a/ares/ares_process.c
+++ b/ares/ares_process.c
@@ -897,6 +897,7 @@ static int open_tcp_socket(ares_channel channel, struct server_state *server)
return -1;
}
+#ifdef TCP_NODELAY
/*
* Disable the Nagle algorithm (only relevant for TCP sockets, and thus not in
* configure_socket). In general, in DNS lookups we're pretty much interested
@@ -910,6 +911,7 @@ static int open_tcp_socket(ares_channel channel, struct server_state *server)
closesocket(s);
return -1;
}
+#endif
/* Connect to the server. */
memset(&sockin, 0, sizeof(sockin));