asyncdispatch: fix erroneous set construction (#13765)

These constants were defined as `cint`. They can be huge on certain
systems, such as Haiku, and trigger out-of-bounds errors in
asyncdispatch.

Ref #13764.
This commit is contained in:
alaviss
2020-03-26 08:26:56 +00:00
committed by GitHub
parent e50441ab33
commit 2da438c33b

View File

@@ -1407,7 +1407,9 @@ else:
MSG_NOSIGNAL)
if res < 0:
let lastError = osLastError()
if lastError.int32 notin {EINTR, EWOULDBLOCK, EAGAIN}:
if lastError.int32 != EINTR and
lastError.int32 != EWOULDBLOCK and
lastError.int32 != EAGAIN:
if flags.isDisconnectionError(lastError):
retFuture.complete()
else: