Commit 0f2f56f6 authored by Tres Seaver's avatar Tres Seaver

Prevent uncaught exceptions from killing ZServer worker threads.

See https://bugs.launchpad.net/zope2/+bug/627988.
parent 8636d92c
......@@ -8,6 +8,9 @@ Zope Changes
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).
- Protect ZCTextIndex's clear method against storing Acquisition wrappers.
......
......@@ -11,11 +11,17 @@
#
##############################################################################
import logging
LOG = logging.getLogger('ZServerPublisher')
class ZServerPublisher:
def __init__(self, accept):
from sys import exc_info
from ZPublisher import publish_module
from ZPublisher.WSGIPublisher import publish_module as publish_wsgi
while 1:
try:
name, a, b=accept()
if name == "Zope2":
try:
......@@ -36,3 +42,5 @@ class ZServerPublisher:
# TODO: Support keeping connections open.
a['wsgi.output']._close = 1
a['wsgi.output'].close()
except:
LOG.error('exception caught', exc_info=True)
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