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
a3db0e00
Commit
a3db0e00
authored
May 10, 2009
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Launchpad #373621: catching and logging exceptions that could cause
leaking of worker threads
parent
c8e631e4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
doc/CHANGES.rst
doc/CHANGES.rst
+3
-0
src/ZServer/PubCore/ZServerPublisher.py
src/ZServer/PubCore/ZServerPublisher.py
+8
-0
No files found.
doc/CHANGES.rst
View file @
a3db0e00
...
@@ -23,6 +23,9 @@ Restructuring
...
@@ -23,6 +23,9 @@ Restructuring
Features Added
Features Added
++++++++++++++
++++++++++++++
- Launchpad #373621: catching and logging exceptions that could cause
leaking of worker threads
- zExceptions.convertExceptionType: new API, breaking out conversion of
- zExceptions.convertExceptionType: new API, breaking out conversion of
exception names to exception types from 'upgradeException'.
exception names to exception types from 'upgradeException'.
...
...
src/ZServer/PubCore/ZServerPublisher.py
View file @
a3db0e00
...
@@ -11,11 +11,17 @@
...
@@ -11,11 +11,17 @@
#
#
##############################################################################
##############################################################################
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
:
try
:
name
,
a
,
b
=
accept
()
name
,
a
,
b
=
accept
()
if
name
==
"Zope2"
:
if
name
==
"Zope2"
:
try
:
try
:
...
@@ -36,3 +42,5 @@ class ZServerPublisher:
...
@@ -36,3 +42,5 @@ class ZServerPublisher:
# 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