Jason Morawski added the comment: Found another issue with this in 2.7
If the socket.error gets raised from the call to self.wfile.flush(), then when self.wfile.close() is called, self.wfile.flush() is called a second time if self.wfile._wbuf is not empty. This will raise the socket.error again. Attaching a patch that explicitly clears the buffer when the socket.error occurs. ---------- nosy: +Jason Morawski Added file: http://bugs.python.org/file40772/clear_buffer_on_error.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14574> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com