Kaydet (Commit) f3ee46b8 authored tarafından Guido van Rossum's avatar Guido van Rossum

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.
üst 3fee3040
......@@ -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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment