Fix: Only handle EPOLLERR as an error event

When an EPOLLRDHUP is received with epoll_ctl, there can still be data
to be read. So we shouldn't immediately close the socket and abort.
This commit is contained in:
def
2015-01-12 23:16:57 +01:00
parent c3e4c1a101
commit 519ec304e4

View File

@@ -157,8 +157,6 @@ elif defined(linux):
var evSet: set[Event] = {}
if (s.events[i].events and EPOLLERR) != 0: evSet = evSet + {EvError}
if (s.events[i].events and EPOLLHUP) != 0: evSet = evSet + {EvError}
if (s.events[i].events and EPOLLRDHUP) != 0: evSet = evSet + {EvError}
if (s.events[i].events and EPOLLIN) != 0: evSet = evSet + {EvRead}
if (s.events[i].events and EPOLLOUT) != 0: evSet = evSet + {EvWrite}
let selectorKey = s.fds[fd]