diff options
author | Kay Zheng <l04m33@gmail.com> | 2015-04-12 12:59:56 +0800 |
---|---|---|
committer | Kay Zheng <l04m33@gmail.com> | 2015-04-12 12:59:56 +0800 |
commit | a7df3ffbe0ed6d10cc952e47f4e92a69403363dc (patch) | |
tree | 68817d082ed204d43980719200e5d36aba14c532 /lib | |
parent | 28ecf72f79efa55f48b4ecd7cbe4ca29ccaa0f95 (diff) | |
download | Nim-a7df3ffbe0ed6d10cc952e47f4e92a69403363dc.tar.gz |
Ignore EvError in `asyncdispatch.poll(...)` for non-windows systems, so that exceptions can be raised from `send(...)` and `recv(...)`
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pure/asyncdispatch.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/pure/asyncdispatch.nim b/lib/pure/asyncdispatch.nim index 27f77cef2..6ed782545 100644 --- a/lib/pure/asyncdispatch.nim +++ b/lib/pure/asyncdispatch.nim @@ -882,9 +882,9 @@ else: let data = PData(info.key.data) assert data.fd == info.key.fd.TAsyncFD #echo("In poll ", data.fd.cint) - if EvError in info.events: - closeSocket(data.fd) - continue + # There may be EvError here, but we handle them in callbacks, + # so that exceptions can be raised from `send(...)` and + # `recv(...)` routines. if EvRead in info.events: # Callback may add items to ``data.readCBs`` which causes issues if |