We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5947e57 + 233d06d commit a2a5b6dCopy full SHA for a2a5b6d
dream-server/extensions/services/dashboard-api/helpers.py
@@ -6,6 +6,7 @@
6
import os
7
import platform
8
import shutil
9
+import socket
10
import time
11
from pathlib import Path
12
from typing import Optional
@@ -33,7 +34,10 @@ async def _get_aio_session() -> aiohttp.ClientSession:
33
34
"""Return (and lazily create) a module-level aiohttp session."""
35
global _aio_session
36
if _aio_session is None or _aio_session.closed:
- _aio_session = aiohttp.ClientSession(timeout=_HEALTH_TIMEOUT)
37
+ _aio_session = aiohttp.ClientSession(
38
+ timeout=_HEALTH_TIMEOUT,
39
+ connector=aiohttp.TCPConnector(family=socket.AF_INET),
40
+ )
41
return _aio_session
42
43
0 commit comments