From a45460718695bbb69fc2b69a740a3e32fc0c1d31 Mon Sep 17 00:00:00 2001 From: "Rafael H. Schloming" Date: Mon, 10 Nov 2008 15:41:42 +0000 Subject: fixed potential race condition in qpid.util.listen; added asserts to internal test cases to ensure that the test only proceeds when the server is bound git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@712679 13f79535-47bb-0310-9956-ffa450edef68 --- python/qpid/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python/qpid') diff --git a/python/qpid/util.py b/python/qpid/util.py index 1ca616f1f5..bb7f5090df 100644 --- a/python/qpid/util.py +++ b/python/qpid/util.py @@ -34,8 +34,8 @@ def listen(host, port, predicate = lambda: True, bound = lambda: None): sock = socket.socket() sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) sock.bind((host, port)) - bound() sock.listen(5) + bound() while predicate(): s, a = sock.accept() yield s -- cgit v1.2.1