mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-05-14 17:59:48 +00:00
Revert "Set socket family of connector to AF_INET"
This change was made since Discord doesn't support IPv6, and there were concerns about clients with DNS64 enabled without NAT64. However, this breaks hosts who don't have v4 connectivity and are _actually_ running NAT64. Having DNS64 without NAT64 is really an issue on the client's end. It would break far more than just discord.py, so I don't think we should be concerned about those cases.
This commit is contained in:
parent
d578709640
commit
f9dbe60fc4
@ -48,7 +48,6 @@ 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
|
||||||
|
|
||||||
@ -798,8 +797,7 @@ 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:
|
||||||
# discord does not support ipv6
|
self.connector = aiohttp.TCPConnector(limit=0)
|
||||||
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