From 124989027bb89d239c51a2edba6afe354369a998 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 30 Jul 2006 23:06:02 +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/branches/1_0_stable@4606 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/userprocess.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/userprocess.cpp') diff --git a/src/userprocess.cpp b/src/userprocess.cpp index d66bc2ab0..5352e6d80 100644 --- a/src/userprocess.cpp +++ b/src/userprocess.cpp @@ -356,7 +356,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 @@ -413,7 +413,7 @@ void DoBackgroundUserStuff(time_t TIME) * We can flush the write buffer as the last thing we do, because if they * match any of the above conditions its no use flushing their buffer anyway. */ - 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.3.1-10-gc9f91