summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-30 23:05:46 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-30 23:05:46 +0000
commitcfc2715066ba2228a510bb845691b1422e3338de (patch)
tree13862c8fe72c9b174670ad90b08de1f016591003
parent63ecaa7059166007635f5dd19b93f2d478fbf1ce (diff)
I think ive found the answer to the hanging connections problem. The majority of stuff in userprocess is skipped over when fd==0, it was fd > 0 rather than fd > -1 in a check. This would prevent one user (near the first) with fd 0 from connecting properly.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4605 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/userprocess.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/userprocess.cpp b/src/userprocess.cpp
index 1c3d7a965..fc60974a3 100644
--- a/src/userprocess.cpp
+++ b/src/userprocess.cpp
@@ -334,7 +334,7 @@ void DoBackgroundUserStuff(time_t TIME)
{
cfd = curr->fd;
- if ((cfd > 0) && (cfd < MAX_DESCRIPTORS) && (fd_ref_table[cfd] == curr) && (curr))
+ if ((cfd > -1) && (cfd < MAX_DESCRIPTORS) && (fd_ref_table[cfd] == curr) && (curr))
{
/*
* registration timeout -- didnt send USER/NICK/HOST
@@ -401,7 +401,7 @@ void DoBackgroundUserStuff(time_t TIME)
*/
/* Check again that theyre still here (something above may have changed that) */
- if ((cfd > 0) && (cfd < MAX_DESCRIPTORS) && (fd_ref_table[cfd] == curr) && (curr))
+ if ((cfd > -1) && (cfd < MAX_DESCRIPTORS) && (fd_ref_table[cfd] == curr) && (curr))
{
curr->FlushWriteBuf();
if (*curr->GetWriteError())