diff options
author | Guido van Rossum <guido@python.org> | 2001-04-15 00:42:13 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-04-15 00:42:13 (GMT) |
commit | f3ee46b82a8dd253b60179f004d9db9b145df2e6 (patch) | |
tree | 6b1f3500d69ab6e31c8356167901e0190076d877 /Lib/test/test_asynchat.py | |
parent | 3fee30407ef6abdc63a227e7a4870dfe712776f4 (diff) | |
download | cpython-f3ee46b82a8dd253b60179f004d9db9b145df2e6.zip cpython-f3ee46b82a8dd253b60179f004d9db9b145df2e6.tar.gz cpython-f3ee46b82a8dd253b60179f004d9db9b145df2e6.tar.bz2 |
Set the SO_REUSEADDR socket option in the server thread -- this seems
needed on some platforms (e.g. Solaris 8) when the test is run twice
in quick succession.
Diffstat (limited to 'Lib/test/test_asynchat.py')
-rw-r--r-- | Lib/test/test_asynchat.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_asynchat.py b/Lib/test/test_asynchat.py index ccaf907..60017e0 100644 --- a/Lib/test/test_asynchat.py +++ b/Lib/test/test_asynchat.py @@ -10,6 +10,7 @@ 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)) sock.listen(1) conn, client = sock.accept() |