summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-09 21:53:56 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-09 21:53:56 +0000
commit205b53ea734183ce640184d298e5d3d46fd397c0 (patch)
tree9d0ec601b401a7366c411459e8c2665250b89e41
parentb42e3e0578e45478129ab6dec563061249104a04 (diff)
Make sure that dns sockets never block (thanks djGrrr)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7694 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/dns.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/dns.cpp b/src/dns.cpp
index c91e45e9c..d9b3671d2 100644
--- a/src/dns.cpp
+++ b/src/dns.cpp
@@ -42,6 +42,7 @@ using irc::sockets::insp_inaddr;
using irc::sockets::insp_ntoa;
using irc::sockets::insp_aton;
using irc::sockets::OpenTCPSocket;
+using irc::sockets::NonBlocking;
/** Masks to mask off the responses we get from the DNSRequest methods
*/
@@ -359,6 +360,7 @@ void DNS::Rehash()
/* Initialize mastersocket */
int s = OpenTCPSocket(ServerInstance->Config->DNSServer, SOCK_DGRAM);
this->SetFd(s);
+ NonBlocking(s);
/* Have we got a socket and is it nonblocking? */
if (this->GetFd() != -1)