force register_server requests to go throut IPv4
This commit is contained in:
parent
6150cf48cb
commit
2d1c15c7bf
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue