fix int set (#341)

This commit is contained in:
Bung 2022-12-29 19:12:12 +08:00 committed by GitHub
parent 5d0c725463
commit e9f8baa6ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -1709,16 +1709,16 @@ else:
let errorMsg = osErrorMsg(osLastError())
retFuture.fail(getConnectionAbortedError(errorMsg))
else:
let err = int(osLastError())
let err = osLastError().int32
if err == EINTR:
continue
elif err == EAGAIN:
# This error appears only when server get closed, while accept()
# continuation is already scheduled.
retFuture.fail(getServerUseClosedError())
elif err in {EMFILE, ENFILE, ENOBUFS, ENOMEM}:
elif err in [EMFILE, ENFILE, ENOBUFS, ENOMEM]:
retFuture.fail(getTransportTooManyError(err))
elif err in {ECONNABORTED, EPERM, ETIMEDOUT}:
elif err in [ECONNABORTED, EPERM, ETIMEDOUT]:
retFuture.fail(getConnectionAbortedError(err))
else:
retFuture.fail(getTransportOsError(OSErrorCode(err)))