summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-05-16 16:26:10 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-05-16 16:26:10 +0000
commit3b9fe8c5bfdfa57806994180bb9b8797cefb8279 (patch)
tree63eeda9332bdd04a6df9da0d3dab8a4e06f5480b
parent55bd1494b060dba7c266b91824f3fcce64a4d7a8 (diff)
Increased listen backlog from 5 to use SOMAXCONN, system defined constant maximim connections as recommended by GeniusDex
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1407 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/connection.cpp2
-rw-r--r--src/inspircd.cpp4
-rw-r--r--src/inspircd_io.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/connection.cpp b/src/connection.cpp
index e08fcb4e1..26d011914 100644
--- a/src/connection.cpp
+++ b/src/connection.cpp
@@ -133,7 +133,7 @@ bool connection::CreateListener(char* newhost, int p)
this->port = p;
- listen(this->fd,5);
+ listen(this->fd,SOMAXCONN);
return true;
}
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 4464be755..a0cfb008d 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -2645,7 +2645,7 @@ int InspIRCd(char** argv, int argc)
{
struct kevent ke;
log(DEBUG,"kqueue: Add listening socket to events, kq=%d socket=%d",lkq,openSockfd[count]);
- EV_SET(&ke, openSockfd[count], EVFILT_READ, EV_ADD, 0, 5, NULL);
+ EV_SET(&ke, openSockfd[count], EVFILT_READ, EV_ADD, 0, SOMAXCONN, NULL);
int i = kevent(lkq, &ke, 1, 0, 0, NULL);
if (i == -1)
{
@@ -2659,7 +2659,7 @@ int InspIRCd(char** argv, int argc)
if (me[t])
{
log(DEBUG,"kqueue: Add listening SERVER socket to events, kq=%d socket=%d",skq,me[t]->fd);
- EV_SET(&ke, me[t]->fd, EVFILT_READ, EV_ADD, 0, 5, NULL);
+ EV_SET(&ke, me[t]->fd, EVFILT_READ, EV_ADD, 0, SOMAXCONN, NULL);
int i = kevent(skq, &ke, 1, 0, 0, NULL);
if (i == -1)
{
diff --git a/src/inspircd_io.cpp b/src/inspircd_io.cpp
index 43e0eec0b..d0535c72c 100644
--- a/src/inspircd_io.cpp
+++ b/src/inspircd_io.cpp
@@ -637,7 +637,7 @@ int BindSocket (int sockfd, struct sockaddr_in client, struct sockaddr_in server
}
else
{
- listen(sockfd,5);
+ listen(sockfd,SOMAXCONN);
return(TRUE);
}
}