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
commit 2da438c33b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1407,7 +1407,9 @@ else:
MSG_NOSIGNAL) MSG_NOSIGNAL)
if res < 0: if res < 0:
let lastError = osLastError() 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): if flags.isDisconnectionError(lastError):
retFuture.complete() retFuture.complete()
else: else: