From 1acf56c1ed6c3c41f619125fb6eca32e7abcc405 Mon Sep 17 00:00:00 2001
From: brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Date: Sun, 26 Mar 2006 01:52:03 +0000
Subject: 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
---
 src/inspircd_io.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'src')

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;
 		}
 	}
-- 
cgit v1.2.3