Skip to content

Commit 85c9202

Browse files
committed
Potential Error Fix
1 parent 24f4c78 commit 85c9202

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/recnetpy/rest/http_client.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from typing import TYPE_CHECKING, Dict
22

33
from asyncio import Lock
4-
from aiohttp import ClientSession
4+
from aiohttp import ClientSession, TCPConnector
55

66
from .async_threads import AsyncThreadPool
77
from .exceptions import HTTPError, BadRequest, InternalServerError
@@ -22,7 +22,8 @@ class HTTPClient:
2222

2323
def __init__(self) -> None:
2424
self.locks = {}
25-
self.session = ClientSession()
25+
connector = TCPConnector()
26+
self.session = ClientSession(connector=connector)
2627
self.thread_pool = AsyncThreadPool(200) #Allows ONLY 200 connections to be processed at any given time.
2728

2829
async def push(self, request: 'Request') -> 'Response':

0 commit comments

Comments
 (0)