diff options
author | def <dennis@felsin9.de> | 2015-01-12 23:16:57 +0100 |
---|---|---|
committer | def <dennis@felsin9.de> | 2015-01-13 00:45:17 +0100 |
commit | 519ec304e44ba79c7a1bb82006a497876adb3d55 (patch) | |
tree | 0a34d3994159e24c2a07d6ec7aaa66cf6df11eca /lib/pure | |
parent | c3e4c1a101f0dd75035070f21d3124c048b0af63 (diff) | |
download | Nim-519ec304e44ba79c7a1bb82006a497876adb3d55.tar.gz |
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.
Diffstat (limited to 'lib/pure')
-rw-r--r-- | lib/pure/selectors.nim | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/pure/selectors.nim b/lib/pure/selectors.nim index dfad644ab..29f6cd3ab 100644 --- a/lib/pure/selectors.nim +++ b/lib/pure/selectors.nim @@ -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] |