fix session closed

pull/1041/head
晴猫 2025-06-05 17:03:13 +09:00 committed by GitHub
parent af7e5e1258
commit fc374903a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 5 deletions

View File

@ -3,11 +3,7 @@ import certifi
import aiohttp
ssl_context = ssl.create_default_context(cafile=certifi.where())
connector = None
async def get_tcp_connector():
global connector
if connector is None:
connector = aiohttp.TCPConnector(ssl=ssl_context)
return connector
return aiohttp.TCPConnector(ssl=ssl_context)