diff options
Diffstat (limited to 'src/socketengine_ports.cpp')
-rw-r--r-- | src/socketengine_ports.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/socketengine_ports.cpp b/src/socketengine_ports.cpp index 18c931748..5a8c616a5 100644 --- a/src/socketengine_ports.cpp +++ b/src/socketengine_ports.cpp @@ -104,15 +104,17 @@ int PortsEngine::DispatchEvents() { switch (this->events[i].portev_source) { - case PORT_SOURCE_FD: - int fd = this->events[i].portev_object; - if (ref[fd]) + case PORT_SOURCE_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); + int fd = this->events[i].portev_object; + 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: + default: break; } } |