From 8b0d96acba7c579b53c2c471f809a16273491daf Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Fri, 28 Jun 2019 13:47:27 -0400 Subject: [PATCH] reuse lbrycrd connector --- torba/torba/server/daemon.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/torba/torba/server/daemon.py b/torba/torba/server/daemon.py index 5a89bb1f8..dd0144fe0 100644 --- a/torba/torba/server/daemon.py +++ b/torba/torba/server/daemon.py @@ -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: