From a7df3ffbe0ed6d10cc952e47f4e92a69403363dc Mon Sep 17 00:00:00 2001 From: Kay Zheng Date: Sun, 12 Apr 2015 12:59:56 +0800 Subject: [PATCH] Ignore EvError in `asyncdispatch.poll(...)` for non-windows systems, so that exceptions can be raised from `send(...)` and `recv(...)` --- lib/pure/asyncdispatch.nim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/pure/asyncdispatch.nim b/lib/pure/asyncdispatch.nim index 27f77cef21..6ed7825453 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