summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-11 19:01:05 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-11 19:01:05 +0000
commit2e629a662d5b180ef35d32bd63e5dd0e1fcf266c (patch)
treef5c07f653a84f82c9ee02b525cab6c94fe4d2f7c /src
parentdf1c2f1d71975402976ae2ae6d7eb84c0a0658a7 (diff)
MORE BUGS GRR
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3676 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/userprocess.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/userprocess.cpp b/src/userprocess.cpp
index 7dc169108..00b086893 100644
--- a/src/userprocess.cpp
+++ b/src/userprocess.cpp
@@ -317,13 +317,13 @@ void DoSocketTimeouts(time_t TIME)
for (std::vector<InspSocket*>::iterator a = module_sockets.begin(); a < module_sockets.end(); a++)
{
InspSocket* s = (InspSocket*)*a;
- if (s->Timeout(TIME))
+ if ((s) && (socket_ref[s->GetFd()] != NULL) && (s->Timeout(TIME)))
{
log(DEBUG,"userprocess.cpp: Socket poll returned false, close and bail");
- SE->DelFd(s->GetFd());
socket_ref[s->GetFd()] = NULL;
- s->Close();
+ SE->DelFd(s->GetFd());
module_sockets.erase(a);
+ s->Close();
delete s;
break;
}