From 1deb57cc18ec1951ec21474a229049f33159458f Mon Sep 17 00:00:00 2001 From: Danijar Hafner Date: Sun, 15 Sep 2024 20:04:36 +0000 Subject: [PATCH] Allow string ports in client socket --- portal/__init__.py | 2 +- portal/client_socket.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/portal/__init__.py b/portal/__init__.py index 5820ef7..78d57cf 100644 --- a/portal/__init__.py +++ b/portal/__init__.py @@ -1,4 +1,4 @@ -__version__ = '3.2.3' +__version__ = '3.2.4' import multiprocessing as mp try: diff --git a/portal/client_socket.py b/portal/client_socket.py index 116b525..45b9116 100644 --- a/portal/client_socket.py +++ b/portal/client_socket.py @@ -186,8 +186,8 @@ def _connect(self): host, port = self.addr if contextlib.context.resolver: host, port = contextlib.context.resolver((host, port)) - assert isinstance(host, str), (host, port) - assert isinstance(port, int), (host, port) + assert isinstance(host, str), (host, port) + port = int(port) addr = (host, port, 0, 0) if self.options.ipv6 else (host, port) sock = self._create() error = None