Skip to content

Commit

Permalink
feat: limit connections
Browse files Browse the repository at this point in the history
  • Loading branch information
BobTheBuidler committed Apr 1, 2024
1 parent 616e39f commit d4742ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dank_mids/helpers/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ async def _get_session_for_thread(thread_ident: int) -> ClientSession:
Most everything should be run in main thread though.
"""
return ClientSession(
connector = TCPConnector(force_close=True),
connector = TCPConnector(limit=50),
headers = {'content-type': 'application/json'},
timeout = ClientTimeout(ENVIRONMENT_VARIABLES.AIOHTTP_TIMEOUT), # type: ignore [arg-type]
raise_for_status = True,
Expand Down

0 comments on commit d4742ce

Please sign in to comment.