Commits

Anonymous committed b2840a3

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.

  • Participants
  • Parent commits c9cae5a
  • Branches legacy-trunk

Comments (0)

Files changed (1)

Lib/test/test_asynchat.py

 
     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()