Fixes web0 on Mac OS X.

This commit is contained in:
Dominik Picheta 2017-05-17 22:11:43 +01:00
commit bf0afaf3c4

View file

@ -3,7 +3,7 @@ template newAsyncNativeSocketImpl(domain, sockType, protocol) =
if handle == osInvalidSocket: if handle == osInvalidSocket:
raiseOSError(osLastError()) raiseOSError(osLastError())
handle.setBlocking(false) handle.setBlocking(false)
when defined(macosx): when defined(macosx) and not defined(nimdoc):
handle.setSockOptInt(SOL_SOCKET, SO_NOSIGPIPE, 1) handle.setSockOptInt(SOL_SOCKET, SO_NOSIGPIPE, 1)
result = handle.AsyncFD result = handle.AsyncFD
register(result) register(result)