diff options
Diffstat (limited to 'Lib/test/test_asynchat.py')
-rw-r--r-- | Lib/test/test_asynchat.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_asynchat.py b/Lib/test/test_asynchat.py index f93587a..9926167 100644 --- a/Lib/test/test_asynchat.py +++ b/Lib/test/test_asynchat.py @@ -13,7 +13,8 @@ class echo_server(threading.Thread): def run(self): sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) - sock.bind((HOST, PORT)) + global PORT + PORT = test_support.bind_port(sock, HOST, PORT) sock.listen(1) conn, client = sock.accept() buffer = "" |