diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-12-11 18:23:15 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-12-11 18:23:15 +0000 |
commit | f5bc7aa7ceaee27df4aa047f3b702619f15fa00c (patch) | |
tree | 9483b5cc4c6441e445a1ae8c21ff9156a9c88e33 /src/socketengine_epoll.cpp | |
parent | 906a91e917c22c793fe280ca657967a9e5d2e3b4 (diff) |
Untested, new clever pointer voodoo class for binary-safe ziplinks output buffers
PLUS: Fix for random epoll dispatchevents crashes.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5926 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/socketengine_epoll.cpp')
-rw-r--r-- | src/socketengine_epoll.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/socketengine_epoll.cpp b/src/socketengine_epoll.cpp index 06124a48c..bc0013b4c 100644 --- a/src/socketengine_epoll.cpp +++ b/src/socketengine_epoll.cpp @@ -140,7 +140,8 @@ int EPollEngine::DispatchEvents() if (events[j].events & EPOLLHUP) { ServerInstance->Log(DEBUG,"Handle error event on fd %d", events[j].data.fd); - ref[events[j].data.fd]->HandleEvent(EVENT_ERROR, 0); + if (ref[events[j].data.fd]) + ref[events[j].data.fd]->HandleEvent(EVENT_ERROR, 0); continue; } if (events[j].events & EPOLLERR) @@ -149,7 +150,8 @@ int EPollEngine::DispatchEvents() if (getsockopt(events[j].data.fd, SOL_SOCKET, SO_ERROR, &errcode, &codesize) < 0) errcode = errno; ServerInstance->Log(DEBUG,"Handle error event on fd %d: %s", events[j].data.fd, strerror(errcode)); - ref[events[j].data.fd]->HandleEvent(EVENT_ERROR, errcode); + if (ref[events[j].data.fd]) + ref[events[j].data.fd]->HandleEvent(EVENT_ERROR, errcode); continue; } if (events[j].events & EPOLLOUT) |