diff options
author | Araq <rumpf_a@web.de> | 2016-11-30 02:08:34 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2016-11-30 02:08:34 +0100 |
commit | 5c46f268802217b774df23d4dcf07a6f7b0ebc20 (patch) | |
tree | 521e7110b8a91bc0bc432ffd8dddb34ecca78c04 /lib | |
parent | 3f7694d08aa3c2c35cdc2fe6a9ab1204ac5466fa (diff) | |
download | Nim-5c46f268802217b774df23d4dcf07a6f7b0ebc20.tar.gz |
fix upcoming/asyncdispatch properly
Diffstat (limited to 'lib')
-rw-r--r-- | lib/upcoming/asyncdispatch.nim | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/upcoming/asyncdispatch.nim b/lib/upcoming/asyncdispatch.nim index 6e14a9fe7..0b5ff89ba 100644 --- a/lib/upcoming/asyncdispatch.nim +++ b/lib/upcoming/asyncdispatch.nim @@ -1070,9 +1070,7 @@ when defined(windows) or defined(nimdoc): if cb(fd): # we need this check to avoid exception, if `unregister(event)` was # called in callback. - if ev.hWaiter != 0: - GC_ref(pcd.ovl) - pcd.ovl.data.cell = system.protect(rawEnv(pcd.ovl.data.cb)) + if ev.hWaiter != 0: unregister(ev) deallocShared(cast[pointer](pcd)) else: GC_ref(pcd.ovl) |