summary refs log tree commit diff stats
path: root/lib/pure/asyncdispatch.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-04-13 22:32:01 +0200
committerAraq <rumpf_a@web.de>2014-04-13 22:32:01 +0200
commit817337af304b8cdf8b96754ae039044840333a02 (patch)
tree471917d192b39759edcaa7bcdd0da28e5b3adc96 /lib/pure/asyncdispatch.nim
parentd96f25619ae001770245c2d0a77abab1e39cff05 (diff)
parentbb94abd88a4668820bf0fd37abcd298dc302eba3 (diff)
downloadNim-817337af304b8cdf8b96754ae039044840333a02.tar.gz
Merge branch 'devel' of https://github.com/Araq/Nimrod into devel
Diffstat (limited to 'lib/pure/asyncdispatch.nim')
-rw-r--r--lib/pure/asyncdispatch.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pure/asyncdispatch.nim b/lib/pure/asyncdispatch.nim
index a8802dec3..5e638dc74 100644
--- a/lib/pure/asyncdispatch.nim
+++ b/lib/pure/asyncdispatch.nim
@@ -381,8 +381,8 @@ when defined(windows) or defined(nimdoc):
       let err = osLastError()
       if err.int32 != ERROR_IO_PENDING:
         dealloc dataBuf.buf
-        retFuture.fail(newException(EOS, osErrorMsg(err)))
         dealloc(ol)
+        retFuture.fail(newException(EOS, osErrorMsg(err)))
     elif ret == 0 and bytesReceived == 0 and dataBuf.buf[0] == '\0':
       # We have to ensure that the buffer is empty because WSARecv will tell
       # us immediatelly when it was disconnected, even when there is still