MCPcopy Create free account
hub / github.com/apache/dubbo-python2 / _send_heartbeat

Method _send_heartbeat

dubbo/connection/connections.py:233–248  ·  view source on GitHub ↗

客户端发送心跳消息 :return:

(self)

Source from the content-addressed store, hash-verified

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 """

Callers

nothing calls this directly

Calls 2

_check_connMethod · 0.95
keysMethod · 0.80

Tested by

no test coverage detected