From 3e771c9dbf89755721624b340980aaf3128e135d Mon Sep 17 00:00:00 2001 From: Dmitry Vasiliev <dima@hlabs.spb.ru> Date: Mon, 23 Jan 2006 14:04:03 +0000 Subject: [PATCH] Fixed shutdown_zeo_server(), on FreeBSD 5.3 it raised timeout error in the second iteration --- src/ZEO/tests/forker.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ZEO/tests/forker.py b/src/ZEO/tests/forker.py index c3bbeaf7..fa43c70e 100644 --- a/src/ZEO/tests/forker.py +++ b/src/ZEO/tests/forker.py @@ -176,8 +176,14 @@ def shutdown_zeo_server(adminaddr): # superstition. for i in range(3): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + s.settimeout(.3) try: s.connect(adminaddr) + except socket.timeout: + # On FreeBSD 5.3 the connection just timed out + if i > 0: + break + raise except socket.error, e: if e[0] == errno.ECONNREFUSED and i > 0: break -- 2.30.9