Merge "Fix oslo.messaging for Mac OS X"
This commit is contained in:
@@ -868,7 +868,8 @@ class Connection(object):
|
|||||||
LOG.debug('Failed to get socket attribute: %s' % str(e))
|
LOG.debug('Failed to get socket attribute: %s' % str(e))
|
||||||
else:
|
else:
|
||||||
sock.settimeout(timeout)
|
sock.settimeout(timeout)
|
||||||
if sys.platform != 'win32':
|
# TCP_USER_TIMEOUT is not defined on Windows and Mac OS X
|
||||||
|
if sys.platform != 'win32' and sys.platform != 'darwin':
|
||||||
sock.setsockopt(socket.IPPROTO_TCP,
|
sock.setsockopt(socket.IPPROTO_TCP,
|
||||||
TCP_USER_TIMEOUT,
|
TCP_USER_TIMEOUT,
|
||||||
timeout * 1000 if timeout is not None else 0)
|
timeout * 1000 if timeout is not None else 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user