Skip to content

Commit

Permalink
Revert "Set socket family of connector to AF_INET"
Browse files Browse the repository at this point in the history
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, so I'm proposing this change be reverted.
  • Loading branch information
oliver-ni committed Jun 25, 2024
1 parent 3a80636 commit 37cc225
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion discord/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ async def static_login(self, token: str) -> user.User:
# Necessary to get aiohttp to stop complaining about session creation
if self.connector is MISSING:
# discord does not support ipv6
self.connector = aiohttp.TCPConnector(limit=0, family=socket.AF_INET)
self.connector = aiohttp.TCPConnector(limit=0)

self.__session = aiohttp.ClientSession(
connector=self.connector,
Expand Down

0 comments on commit 37cc225

Please sign in to comment.