From cfc2715066ba2228a510bb845691b1422e3338de Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 30 Jul 2006 23:05:46 +0000 Subject: 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 --- src/userprocess.cpp | 4 ++-- 1 file 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()) -- cgit v1.2.3