This commit is contained in:
Thomas S Hatch 2012-12-10 12:10:30 -07:00
parent 52ce466f6b
commit ae4a988a78

View File

@ -125,6 +125,10 @@ class SREQ(object):
self.serial = Serial(serial)
self.context = zmq.Context()
self.socket = self.context.socket(zmq.REQ)
if hasattr(zmq, 'RECONNECT_IVL_MAX'):
self.socket.setsockopt(
zmq.RECONNECT_IVL_MAX, 5
)
self.socket.linger = linger
if id_:
self.socket.setsockopt(zmq.IDENTITY, id_)