Show More
@@ -83,21 +83,21 b' class HeartMonitor(object):' | |||||
83 | logger.debug("heartbeat::new heart failure handler: %s"%handler) |
|
83 | logger.debug("heartbeat::new heart failure handler: %s"%handler) | |
84 | self._failure_handlers.add(handler) |
|
84 | self._failure_handlers.add(handler) | |
85 |
|
85 | |||
86 | def _flush(self): |
|
86 | # def _flush(self): | |
87 | """override IOLoop triggers""" |
|
87 | # """override IOLoop triggers""" | |
88 | while True: |
|
88 | # while True: | |
89 | try: |
|
89 | # try: | |
90 | msg = self.pongstream.socket.recv_multipart(zmq.NOBLOCK) |
|
90 | # msg = self.pongstream.socket.recv_multipart(zmq.NOBLOCK) | |
91 | logger.warn("IOLoop triggered beat with incoming heartbeat waiting to be handled") |
|
91 | # logger.warn("IOLoop triggered beat with incoming heartbeat waiting to be handled") | |
92 | except zmq.ZMQError: |
|
92 | # except zmq.ZMQError: | |
93 | return |
|
93 | # return | |
94 | else: |
|
94 | # else: | |
95 | self.handle_pong(msg) |
|
95 | # self.handle_pong(msg) | |
96 | # print '.' |
|
96 | # # print '.' | |
97 |
|
97 | # | ||
98 |
|
98 | |||
99 | def beat(self): |
|
99 | def beat(self): | |
100 |
self. |
|
100 | self.pongstream.flush() | |
101 | self.last_ping = self.lifetime |
|
101 | self.last_ping = self.lifetime | |
102 |
|
102 | |||
103 | toc = time.time() |
|
103 | toc = time.time() |
General Comments 0
You need to be logged in to leave comments.
Login now