diff --git a/Sources/Socket/System/Poll.swift b/Sources/Socket/System/Poll.swift index f637c30..870063a 100644 --- a/Sources/Socket/System/Poll.swift +++ b/Sources/Socket/System/Poll.swift @@ -81,7 +81,7 @@ extension SocketDescriptor { ) return nothingOrErrno(retryOnInterrupt: retryOnInterrupt) { system_poll(&pollFD, 1, timeout) - }.map { FileEvents(rawValue: events.rawValue) } + }.map { FileEvents(rawValue: pollFD.revents) } } }