From 205b53ea734183ce640184d298e5d3d46fd397c0 Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 9 Aug 2007 21:53:56 +0000 Subject: 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 --- src/dns.cpp | 2 ++ 1 file changed, 2 insertions(+) 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) -- cgit v1.2.3