fix session closed
This commit is contained in:
@@ -3,11 +3,7 @@ import certifi
|
|||||||
import aiohttp
|
import aiohttp
|
||||||
|
|
||||||
ssl_context = ssl.create_default_context(cafile=certifi.where())
|
ssl_context = ssl.create_default_context(cafile=certifi.where())
|
||||||
connector = None
|
|
||||||
|
|
||||||
|
|
||||||
async def get_tcp_connector():
|
async def get_tcp_connector():
|
||||||
global connector
|
return aiohttp.TCPConnector(ssl=ssl_context)
|
||||||
if connector is None:
|
|
||||||
connector = aiohttp.TCPConnector(ssl=ssl_context)
|
|
||||||
return connector
|
|
||||||
|
|||||||
Reference in New Issue
Block a user