forked from LBRYCommunity/lbry-sdk
reuse lbrycrd connector
This commit is contained in:
parent
66122a45ed
commit
8b0d96acba
1 changed files with 2 additions and 1 deletions
|
@ -55,6 +55,7 @@ class Daemon:
|
|||
self.max_retry = max_retry
|
||||
self._height = None
|
||||
self.available_rpcs = {}
|
||||
self.connector = aiohttp.TCPConnector()
|
||||
|
||||
def set_url(self, url):
|
||||
"""Set the URLS to the given list, and switch to the first one."""
|
||||
|
@ -89,7 +90,7 @@ class Daemon:
|
|||
|
||||
def client_session(self):
|
||||
"""An aiohttp client session."""
|
||||
return aiohttp.ClientSession()
|
||||
return aiohttp.ClientSession(connector=self.connector, connector_owner=False)
|
||||
|
||||
async def _send_data(self, data):
|
||||
async with self.workqueue_semaphore:
|
||||
|
|
Loading…
Reference in a new issue