fixes #7667; underlying issue is that dot calls in generics have no concept of 'friend' symbols, will be addressed later

This commit is contained in:
Araq 2018-10-29 13:46:46 +01:00
commit e44df5dca6

View file

@ -383,14 +383,14 @@ proc selectInto*[T](s: Selector[T], timeout: int,
if (pevents and EPOLLERR) != 0 or (pevents and EPOLLHUP) != 0: if (pevents and EPOLLERR) != 0 or (pevents and EPOLLHUP) != 0:
if (pevents and EPOLLHUP) != 0: if (pevents and EPOLLHUP) != 0:
rkey.errorCode = ECONNRESET.OSErrorCode rkey.errorCode = OSErrorCode ECONNRESET
else: else:
# Try reading SO_ERROR from fd. # Try reading SO_ERROR from fd.
var error: cint var error: cint
var size = sizeof(error).SockLen var size = SockLen sizeof(error)
if getsockopt(fdi.SocketHandle, SOL_SOCKET, SO_ERROR, addr(error), if getsockopt(SocketHandle fdi, SOL_SOCKET, SO_ERROR, addr(error),
addr(size)) == 0'i32: addr(size)) == 0'i32:
rkey.errorCode = error.OSErrorCode rkey.errorCode = OSErrorCode error
rkey.events.incl(Event.Error) rkey.events.incl(Event.Error)
if (pevents and EPOLLOUT) != 0: if (pevents and EPOLLOUT) != 0: