OSX: make tioslectors test green

This commit is contained in:
Andreas Rumpf
2018-08-06 14:21:29 +02:00
parent 8ad59e6857
commit 39b3b94008

View File

@@ -567,8 +567,11 @@ proc selectInto*[T](s: Selector[T], timeout: int,
doAssert(true, "Unsupported kqueue filter in the queue!")
if (kevent.flags and EV_EOF) != 0:
# TODO this error handling needs to be rethought.
# `fflags` can sometimes be `0x80000000` and thus we use 'cast'
# here:
if kevent.fflags != 0:
rkey.errorCode = kevent.fflags.OSErrorCode
rkey.errorCode = cast[OSErrorCode](kevent.fflags)
else:
# This assumes we are dealing with sockets.
# TODO: For future-proofing it might be a good idea to give the