Make IPv4 mandatory in session files

This commit is contained in:
Lonami Exo
2021-09-19 17:30:31 +02:00
parent d60ebbe6ea
commit 58c0a5bc24
3 changed files with 12 additions and 11 deletions

View File

@@ -323,7 +323,7 @@ async def connect(self: 'TelegramClient') -> None:
self._sender.auth_key.key = dc.auth
if not await self._sender.connect(self._connection(
str(ipaddress.ip_address(dc.ipv6 or dc.ipv4)),
str(ipaddress.ip_address((self._use_ipv6 and dc.ipv6) or dc.ipv4)),
dc.port,
dc.id,
loggers=self._log,