mirror of https://github.com/celery/kombu.git
Add libzmq 3.2.x compatibility.
pyzmq compiled with zeromq-3.2 does not have HWM socket opt. Instead of this, exists SNDHWM that replaces it.
This commit is contained in:
parent
f9e09b65f5
commit
c70b2dc0ec
|
@ -111,7 +111,12 @@ class Client(object):
|
|||
self.sink = None
|
||||
|
||||
self.vent = self.context.socket(zmq.PUSH)
|
||||
self.vent.setsockopt(zmq.HWM, hwm)
|
||||
|
||||
if hasattr(zmq, 'SNDHWM'):
|
||||
self.vent.setsockopt(zmq.SNDHWM, hwm)
|
||||
else:
|
||||
self.vent.setsockopt(zmq.HWM, hwm)
|
||||
|
||||
if swap_size:
|
||||
self.vent.setsockopt(zmq.SWAP, swap_size)
|
||||
|
||||
|
|
Loading…
Reference in New Issue