Commit 083afb24 authored by Dmitry Vasiliev's avatar Dmitry Vasiliev

Fixed shutdown_zeo_server(), on FreeBSD 5.3 it raised timeout error

in the second iteration
parent 6d8ba1ff
......@@ -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
......
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