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
This commit is contained in:
brain 2006-03-26 01:52:03 +00:00
parent c46c37300a
commit 1acf56c1ed

View File

@ -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 * a maximum of one second before it times out, using the DNS
* server specified in the configuration file. * 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)); memset((char *)&server,0,sizeof(server));
struct in_addr addy; struct in_addr addy;
@ -1521,6 +1521,7 @@ bool BindSocket (int sockfd, struct sockaddr_in client, struct sockaddr_in serve
} }
else else
{ {
NonBlocking(sockfd);
return true; return true;
} }
} }