diff --git a/lib/init_server.py b/lib/init_server.py index 4312d0b..35d8f82 100644 --- a/lib/init_server.py +++ b/lib/init_server.py @@ -3,6 +3,7 @@ from lib import logging as logging_lib from lib import get_specs from lib import utils import threading +import socket import aiohttp import asyncio import json @@ -47,7 +48,9 @@ async def register_server(data): "Content-Type": "application/json" } - async with aiohttp.ClientSession() as session: + connector = aiohttp.TCPConnector(family=socket.AF_INET) + + async with aiohttp.ClientSession(connector=connector) as session: try: async with session.post(url, data=json_data, headers=headers, timeout=15) as response: if response.status == 200: