OSX: make tioslectors test green
This commit is contained in:
parent
8ad59e6857
commit
39b3b94008
1 changed files with 4 additions and 1 deletions
|
|
@ -567,8 +567,11 @@ proc selectInto*[T](s: Selector[T], timeout: int,
|
||||||
doAssert(true, "Unsupported kqueue filter in the queue!")
|
doAssert(true, "Unsupported kqueue filter in the queue!")
|
||||||
|
|
||||||
if (kevent.flags and EV_EOF) != 0:
|
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:
|
if kevent.fflags != 0:
|
||||||
rkey.errorCode = kevent.fflags.OSErrorCode
|
rkey.errorCode = cast[OSErrorCode](kevent.fflags)
|
||||||
else:
|
else:
|
||||||
# This assumes we are dealing with sockets.
|
# This assumes we are dealing with sockets.
|
||||||
# TODO: For future-proofing it might be a good idea to give the
|
# TODO: For future-proofing it might be a good idea to give the
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue