客户端发送心跳消息 :return:
(self)
| 231 | return DubboResponseException(error) |
| 232 | |
| 233 | def _send_heartbeat(self): |
| 234 | """ |
| 235 | 客户端发送心跳消息 |
| 236 | :return: |
| 237 | """ |
| 238 | while 1: |
| 239 | starting = time.time() |
| 240 | for host in self._connection_pool.keys(): |
| 241 | try: |
| 242 | self._check_conn(host) |
| 243 | except Exception as e: |
| 244 | logger.exception(e) |
| 245 | ending = time.time() |
| 246 | time_delta = ending - starting |
| 247 | if time_delta < TIMEOUT_CHECK_INTERVAL: |
| 248 | time.sleep(TIMEOUT_CHECK_INTERVAL - time_delta) |
| 249 | |
| 250 | def _check_conn(self, host): |
| 251 | """ |
nothing calls this directly
no test coverage detected