diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-04-08 19:48:57 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-04-08 19:48:57 +0000 |
commit | b4ebbfad6f5fba24e9bde95c3f7a8ac80b83b9b0 (patch) | |
tree | aa507f01b9fa3441513a1c8bd4200d0c90582069 /src | |
parent | 772dc6c47406b0ca6be5e49914dd739c8d580bd5 (diff) |
Fix to reinsert sockets into the list as read event
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6764 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/socketengine_ports.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/socketengine_ports.cpp b/src/socketengine_ports.cpp index f036a8e10..18c931748 100644 --- a/src/socketengine_ports.cpp +++ b/src/socketengine_ports.cpp @@ -106,7 +106,12 @@ int PortsEngine::DispatchEvents() { case PORT_SOURCE_FD: int fd = this->events[i].portev_object; - ref[fd]->HandleEvent((this->events[i].portev_events & POLLRDNORM) ? EVENT_READ : EVENT_WRITE); + if (ref[fd]) + { + // reinsert port for next time around + port_associate(EngineHandle, PORT_SOURCE_FD, fd, POLLRDNORM, ref[fd]); + ref[fd]->HandleEvent((this->events[i].portev_events & POLLRDNORM) ? EVENT_READ : EVENT_WRITE); + } default: break; } |