Fix connect() bug.

This commit is contained in:
cheatfate 2018-06-07 22:07:17 +03:00
parent 3ad36cc4c1
commit de7e0f41e9
1 changed files with 2 additions and 1 deletions

View File

@ -613,7 +613,8 @@ else:
sock = createAsyncSocket(address.address.getDomain(), SockType.SOCK_STREAM,
Protocol.IPPROTO_TCP)
if sock == asyncInvalidSocket:
result.fail(newException(OSError, osErrorMsg(osLastError())))
retFuture.fail(newException(OSError, osErrorMsg(osLastError())))
return retFuture
proc continuation(udata: pointer) =
var data = cast[ptr CompletionData](udata)