Skip to content

Commit a2a5b6d

Browse files
Merge pull request #761 from yasinBursali/fix/health-check-ipv4
fix: force IPv4 in health checker to prevent WSL2 DNS delays
2 parents 5947e57 + 233d06d commit a2a5b6d

File tree

1 file changed

+5
-1
lines changed
  • dream-server/extensions/services/dashboard-api

1 file changed

+5
-1
lines changed

dream-server/extensions/services/dashboard-api/helpers.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import os
77
import platform
88
import shutil
9+
import socket
910
import time
1011
from pathlib import Path
1112
from typing import Optional
@@ -33,7 +34,10 @@ async def _get_aio_session() -> aiohttp.ClientSession:
3334
"""Return (and lazily create) a module-level aiohttp session."""
3435
global _aio_session
3536
if _aio_session is None or _aio_session.closed:
36-
_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+
)
3741
return _aio_session
3842

3943

0 commit comments

Comments
 (0)