This commit is contained in:
Andreas Rumpf
2019-05-13 17:34:15 +02:00
parent 69658ad396
commit fb1c3a95a5

View File

@@ -500,7 +500,7 @@ proc selectInto*[T](s: Selector[T], timeout: int,
if (kevent.flags and EV_ERROR) != 0:
rkey.events = {Event.Error}
rkey.errorCode = kevent.data.OSErrorCode
rkey.errorCode = OSErrorCode(kevent.data)
case kevent.filter:
of EVFILT_READ:
@@ -576,7 +576,7 @@ proc selectInto*[T](s: Selector[T], timeout: int,
# This assumes we are dealing with sockets.
# TODO: For future-proofing it might be a good idea to give the
# user access to the raw `kevent`.
rkey.errorCode = ECONNRESET.OSErrorCode
rkey.errorCode = OSErrorCode(ECONNRESET)
rkey.events.incl(Event.Error)
results[k] = rkey