Show More
@@ -178,6 +178,8 b' class EngineFactory(RegistrationFactory):' | |||||
178 | hb_ping = maybe_tunnel(url('hb_ping')) |
|
178 | hb_ping = maybe_tunnel(url('hb_ping')) | |
179 | hb_pong = maybe_tunnel(url('hb_pong')) |
|
179 | hb_pong = maybe_tunnel(url('hb_pong')) | |
180 |
|
180 | |||
|
181 | hb_monitor = None | |||
|
182 | if self.max_heartbeat_misses > 0: | |||
181 | # Add a monitor socket which will record the last time a ping was seen |
|
183 | # Add a monitor socket which will record the last time a ping was seen | |
182 | mon = self.context.socket(zmq.SUB) |
|
184 | mon = self.context.socket(zmq.SUB) | |
183 | mport = mon.bind_to_random_port('tcp://127.0.0.1') |
|
185 | mport = mon.bind_to_random_port('tcp://127.0.0.1') | |
@@ -185,8 +187,7 b' class EngineFactory(RegistrationFactory):' | |||||
185 | self._hb_listener = zmqstream.ZMQStream(mon, self.loop) |
|
187 | self._hb_listener = zmqstream.ZMQStream(mon, self.loop) | |
186 | self._hb_listener.on_recv(self._report_ping) |
|
188 | self._hb_listener.on_recv(self._report_ping) | |
187 |
|
189 | |||
188 | hb_monitor = None |
|
190 | ||
189 | if self.max_heartbeat_misses > 0: |
|
|||
190 | hb_monitor = "tcp://127.0.0.1:%i"%mport |
|
191 | hb_monitor = "tcp://127.0.0.1:%i"%mport | |
191 |
|
192 | |||
192 | heart = Heart(hb_ping, hb_pong, hb_monitor , heart_id=identity) |
|
193 | heart = Heart(hb_ping, hb_pong, hb_monitor , heart_id=identity) |
General Comments 0
You need to be logged in to leave comments.
Login now