mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-19 01:18:32 +00:00
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:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user