Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
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
gevent
Commits
524a51e6
Commit
524a51e6
authored
Jan 23, 2014
by
Paul Collier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Suppress EPIPE and ECONNRESET tracebacks properly
Fixes #136.
parent
e26ad644
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
gevent/pywsgi.py
gevent/pywsgi.py
+9
-10
No files found.
gevent/pywsgi.py
View file @
524a51e6
...
...
@@ -351,16 +351,7 @@ class WSGIHandler(object):
self
.
environ
=
self
.
get_environ
()
self
.
application
=
self
.
server
.
application
try
:
self
.
handle_one_response
()
except
socket
.
error
as
ex
:
# Broken pipe, connection reset by peer
if
ex
.
args
[
0
]
in
(
errno
.
EPIPE
,
errno
.
ECONNRESET
):
if
not
PY3
:
sys
.
exc_clear
()
return
else
:
raise
self
.
handle_one_response
()
if
self
.
close_connection
:
return
...
...
@@ -522,6 +513,14 @@ class WSGIHandler(object):
if
close
is
not
None
:
close
()
self
.
wsgi_input
.
_discard
()
except
socket
.
error
as
ex
:
# Broken pipe, connection reset by peer
if
ex
.
args
[
0
]
in
(
errno
.
EPIPE
,
errno
.
ECONNRESET
):
if
not
PY3
:
sys
.
exc_clear
()
self
.
close_connection
=
True
else
:
self
.
handle_error
(
*
sys
.
exc_info
())
except
:
self
.
handle_error
(
*
sys
.
exc_info
())
finally
:
...
...
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