in dubbo/connection/connections.py [0:0]
def _get_connection(self, host):
"""
通过host获取到与此host相关的socket,本地会对socket进行缓存
:param host:
:return:
"""
if not host or ':' not in host:
raise ValueError('invalid host {}'.format(host))
if host not in self._connection_pool:
self.conn_lock.acquire()
try:
if host not in self._connection_pool:
self.client_heartbeats[host] = 0
self._new_connection(host)
finally:
self.conn_lock.release()
return self._connection_pool[host]