Commit 27b60ba6 authored by Denis Bilenko's avatar Denis Bilenko

pywsgi: if we failed to send the reply, change 'status' to socket error so...

pywsgi: if we failed to send the reply, change 'status' to socket error so that the logs mention the error
parent c5597248
......@@ -372,7 +372,13 @@ class WSGIHandler(object):
towrite.append(data)
msg = ''.join(towrite)
self.socket.sendall(msg)
try:
self.socket.sendall(msg)
except socket.error, ex:
self.status = 'socket error: %s' % ex
if self.code > 0:
self.code = -self.code
raise
self.response_length += len(msg)
def start_response(self, status, headers, exc_info=None):
......
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