Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
0f2f56f6
Commit
0f2f56f6
authored
Sep 01, 2010
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent uncaught exceptions from killing ZServer worker threads.
See
https://bugs.launchpad.net/zope2/+bug/627988
.
parent
8636d92c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
19 deletions
+30
-19
doc/CHANGES.txt
doc/CHANGES.txt
+3
-0
lib/python/ZServer/PubCore/ZServerPublisher.py
lib/python/ZServer/PubCore/ZServerPublisher.py
+27
-19
No files found.
doc/CHANGES.txt
View file @
0f2f56f6
...
@@ -8,6 +8,9 @@ Zope Changes
...
@@ -8,6 +8,9 @@ Zope Changes
Bugs fixed
Bugs fixed
- Prevent uncaught exceptions from killing ZServer worker threads.
https://bugs.launchpad.net/zope2/+bug/627988
- Updated 'pytz' external to point to '2010b' version (not via Zope3).
- Updated 'pytz' external to point to '2010b' version (not via Zope3).
- Protect ZCTextIndex's clear method against storing Acquisition wrappers.
- Protect ZCTextIndex's clear method against storing Acquisition wrappers.
...
...
lib/python/ZServer/PubCore/ZServerPublisher.py
View file @
0f2f56f6
...
@@ -11,28 +11,36 @@
...
@@ -11,28 +11,36 @@
#
#
##############################################################################
##############################################################################
import
logging
LOG
=
logging
.
getLogger
(
'ZServerPublisher'
)
class
ZServerPublisher
:
class
ZServerPublisher
:
def
__init__
(
self
,
accept
):
def
__init__
(
self
,
accept
):
from
sys
import
exc_info
from
ZPublisher
import
publish_module
from
ZPublisher
import
publish_module
from
ZPublisher.WSGIPublisher
import
publish_module
as
publish_wsgi
from
ZPublisher.WSGIPublisher
import
publish_module
as
publish_wsgi
while
1
:
while
1
:
name
,
a
,
b
=
accept
()
try
:
if
name
==
"Zope2"
:
name
,
a
,
b
=
accept
()
try
:
if
name
==
"Zope2"
:
publish_module
(
try
:
name
,
publish_module
(
request
=
a
,
name
,
response
=
b
)
request
=
a
,
finally
:
response
=
b
)
b
.
_finish
()
finally
:
a
=
b
=
None
b
.
_finish
()
a
=
b
=
None
elif
name
==
"Zope2WSGI"
:
elif
name
==
"Zope2WSGI"
:
try
:
try
:
res
=
publish_wsgi
(
a
,
b
)
res
=
publish_wsgi
(
a
,
b
)
for
r
in
res
:
for
r
in
res
:
a
[
'wsgi.output'
].
write
(
r
)
a
[
'wsgi.output'
].
write
(
r
)
finally
:
finally
:
# TODO: Support keeping connections open.
# TODO: Support keeping connections open.
a
[
'wsgi.output'
].
_close
=
1
a
[
'wsgi.output'
].
_close
=
1
a
[
'wsgi.output'
].
close
()
a
[
'wsgi.output'
].
close
()
except
:
LOG
.
error
(
'exception caught'
,
exc_info
=
True
)
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