We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 24f4c78 commit 85c9202Copy full SHA for 85c9202
src/recnetpy/rest/http_client.py
@@ -1,7 +1,7 @@
1
from typing import TYPE_CHECKING, Dict
2
3
from asyncio import Lock
4
-from aiohttp import ClientSession
+from aiohttp import ClientSession, TCPConnector
5
6
from .async_threads import AsyncThreadPool
7
from .exceptions import HTTPError, BadRequest, InternalServerError
@@ -22,7 +22,8 @@ class HTTPClient:
22
23
def __init__(self) -> None:
24
self.locks = {}
25
- self.session = ClientSession()
+ connector = TCPConnector()
26
+ self.session = ClientSession(connector=connector)
27
self.thread_pool = AsyncThreadPool(200) #Allows ONLY 200 connections to be processed at any given time.
28
29
async def push(self, request: 'Request') -> 'Response':
0 commit comments