Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZEO
Commits
b6309b53
Commit
b6309b53
authored
Oct 08, 2003
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Port more-robust shutdown_zeo_server() from Zope-2_7-branch.
parent
dac84673
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
9 deletions
+20
-9
src/ZEO/tests/forker.py
src/ZEO/tests/forker.py
+20
-9
No files found.
src/ZEO/tests/forker.py
View file @
b6309b53
...
...
@@ -123,12 +123,23 @@ else:
def
shutdown_zeo_server
(
adminaddr
):
s
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
s
.
connect
(
adminaddr
)
try
:
ack
=
s
.
recv
(
1024
)
except
socket
.
error
,
e
:
if
e
[
0
]
<>
errno
.
ECONNRESET
:
raise
ack
=
'no ack received'
zLOG
.
LOG
(
'shutdownServer'
,
zLOG
.
DEBUG
,
'acked: %s'
%
ack
)
s
.
close
()
# Do this in a loop to guard against the possibility that the
# client failed to connect to the adminaddr earlier. That really
# only requires two iterations, but do a third for pure
# superstition.
for
i
in
range
(
3
):
s
=
socket
.
socket
(
socket
.
AF_INET
,
socket
.
SOCK_STREAM
)
try
:
s
.
connect
(
adminaddr
)
except
socket
.
error
,
e
:
if
e
[
0
]
==
errno
.
ECONNREFUSED
and
i
>
0
:
break
raise
try
:
ack
=
s
.
recv
(
1024
)
except
socket
.
error
,
e
:
if
e
[
0
]
==
errno
.
ECONNRESET
:
raise
ack
=
'no ack received'
zLOG
.
LOG
(
'shutdownServer'
,
zLOG
.
DEBUG
,
'acked: %s'
%
ack
)
s
.
close
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment