mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-07-03 16:50:03 +00:00
Set socket family of connector to AF_INET
- discord doesn't support ipv6 - prevents issues with hosts with DNS64 enabled - resolves #9442
This commit is contained in:
parent
914773d0fb
commit
e6d2d82803
@ -48,6 +48,7 @@ from typing import (
|
|||||||
from urllib.parse import quote as _uriquote
|
from urllib.parse import quote as _uriquote
|
||||||
from collections import deque
|
from collections import deque
|
||||||
import datetime
|
import datetime
|
||||||
|
import socket
|
||||||
|
|
||||||
import aiohttp
|
import aiohttp
|
||||||
|
|
||||||
@ -784,7 +785,8 @@ class HTTPClient:
|
|||||||
async def static_login(self, token: str) -> user.User:
|
async def static_login(self, token: str) -> user.User:
|
||||||
# Necessary to get aiohttp to stop complaining about session creation
|
# Necessary to get aiohttp to stop complaining about session creation
|
||||||
if self.connector is MISSING:
|
if self.connector is MISSING:
|
||||||
self.connector = aiohttp.TCPConnector(limit=0)
|
# discord does not support ipv6
|
||||||
|
self.connector = aiohttp.TCPConnector(limit=0, family=socket.AF_INET)
|
||||||
|
|
||||||
self.__session = aiohttp.ClientSession(
|
self.__session = aiohttp.ClientSession(
|
||||||
connector=self.connector,
|
connector=self.connector,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user