From: Ben Darnell Date: Wed, 16 Feb 2011 21:21:40 +0000 (-0800) Subject: Use SO_REUSEADDR in low-level socket tests. X-Git-Tag: v1.2.0~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=05b62938e2019726331f57dfa631ee794c22e393;p=thirdparty%2Ftornado.git Use SO_REUSEADDR in low-level socket tests. --- diff --git a/tornado/test/simple_httpclient_test.py b/tornado/test/simple_httpclient_test.py index 2abdaecfe..7a66884d8 100644 --- a/tornado/test/simple_httpclient_test.py +++ b/tornado/test/simple_httpclient_test.py @@ -138,6 +138,7 @@ class SimpleHTTPClientTestCase(AsyncHTTPTestCase, LogTrapTestCase): port = get_unused_port() with closing(socket.socket()) as sock: + sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) sock.bind(('', port)) self.http_client.fetch("http://localhost:%d/" % port, self.stop,