summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-26 01:52:03 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-26 01:52:03 +0000
commit1acf56c1ed6c3c41f619125fb6eca32e7abcc405 (patch)
treeee02ea4756d8696a9f5a439219454b27ed450ea2
parentc46c37300ad6b6e90dd2935f0fd6c94986aedea4 (diff)
Listening sockets are now explicitly nonblocking just in case the socket engine screws up and says we can accept() when we cant...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3755 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/inspircd_io.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/inspircd_io.cpp b/src/inspircd_io.cpp
index da2b30ba5..328d7c67e 100644
--- a/src/inspircd_io.cpp
+++ b/src/inspircd_io.cpp
@@ -1468,7 +1468,7 @@ int ServerConfig::ConfValueInteger(char* tag, char* var, int index, std::strings
* a maximum of one second before it times out, using the DNS
* server specified in the configuration file.
*/
-bool BindSocket (int sockfd, struct sockaddr_in client, struct sockaddr_in server, int port, char* addr)
+bool BindSocket(int sockfd, struct sockaddr_in client, struct sockaddr_in server, int port, char* addr)
{
memset((char *)&server,0,sizeof(server));
struct in_addr addy;
@@ -1521,6 +1521,7 @@ bool BindSocket (int sockfd, struct sockaddr_in client, struct sockaddr_in serve
}
else
{
+ NonBlocking(sockfd);
return true;
}
}