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:
parent
c3e4c1a101
commit
519ec304e4
1 changed files with 0 additions and 2 deletions
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue