From 1736a8ea9b0dd3aaf0cdc20f501a835b0c7dfa82 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Wed, 11 Apr 2018 23:21:14 +0200 Subject: [PATCH] Use port 443 for production servers --- pyrogram/connection/connection.py | 4 ++-- pyrogram/session/internals/data_center.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyrogram/connection/connection.py b/pyrogram/connection/connection.py index 02f57efc..509cd10d 100644 --- a/pyrogram/connection/connection.py +++ b/pyrogram/connection/connection.py @@ -32,8 +32,8 @@ class Connection: 2: TCPIntermediate } - def __init__(self, ipv4: str, proxy: type, mode: int = 1): - self.address = (ipv4, 80) + def __init__(self, address: tuple, proxy: type, mode: int = 1): + self.address = address self.proxy = proxy self.mode = self.MODES.get(mode, TCPAbridged) self.lock = threading.Lock() diff --git a/pyrogram/session/internals/data_center.py b/pyrogram/session/internals/data_center.py index 369e5bce..232ca13b 100644 --- a/pyrogram/session/internals/data_center.py +++ b/pyrogram/session/internals/data_center.py @@ -35,4 +35,4 @@ class DataCenter: } def __new__(cls, dc_id: int, test_mode: bool): - return cls.TEST[dc_id] if test_mode else cls.PROD[dc_id] + return (cls.TEST[dc_id], 80) if test_mode else (cls.PROD[dc_id], 443)