[issue14574] SocketServer doesn't handle client disconnects properly

2017-10-31 Thread Matej Cepl
Matej Cepl added the comment: The last patch (clear_buffer_on_error.patch) has still not been applied (looking at 2.7 and master branches). -- nosy: +mcepl ___ Python tracker

[issue14574] SocketServer doesn't handle client disconnects properly

2016-01-05 Thread John Szakmeister
John Szakmeister added the comment: FWIW, I'm seeing the same issue as Jason too, and his solution seems reasonable to me. -- nosy: +jszakmeister ___ Python tracker

[issue14574] SocketServer doesn't handle client disconnects properly

2015-10-13 Thread Jason Morawski
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

[issue14574] SocketServer doesn't handle client disconnects properly

2012-12-26 Thread Charles-François Natali
Charles-François Natali added the comment: Semantically, but I am told that due to py3k's different file buffering, that those errors don't percolate through. According to Charles-Francois' post from apr, 14th: Note that Python 3.3 doesn't have this problem. It's not affected by the

[issue14574] SocketServer doesn't handle client disconnects properly

2012-12-26 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Ok, I'll have a look. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14574 ___ ___ Python-bugs-list

[issue14574] SocketServer doesn't handle client disconnects properly

2012-12-26 Thread Kristján Valur Jónsson
Changes by Kristján Valur Jónsson krist...@ccpgames.com: -- versions: +Python 3.2, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14574 ___

[issue14574] SocketServer doesn't handle client disconnects properly

2012-12-26 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7e5d7ef4634d by Kristján Valur Jónsson in branch '3.2': Issue #14574: Ignore socket errors raised when flushing a connection on close. http://hg.python.org/cpython/rev/7e5d7ef4634d New changeset 7734c3020a47 by Kristján Valur Jónsson in branch

[issue14574] SocketServer doesn't handle client disconnects properly

2012-12-26 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: There, applied the same changes to the 3.x branches. apparently the DOC folder wasn't branched off for 3.3, or something, at least, there is no sepatate 3.3 and 'default' version of socketserver.rst. Or maybe it is just Hg that got the better of me.

[issue14574] SocketServer doesn't handle client disconnects properly

2012-12-26 Thread Andrew Svetlov
Andrew Svetlov added the comment: Everything is fine. Close the issue. -- stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14574 ___

[issue14574] SocketServer doesn't handle client disconnects properly

2012-12-25 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: So, should I commit this? The change is really trivial. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14574 ___

[issue14574] SocketServer doesn't handle client disconnects properly

2012-12-25 Thread Charles-François Natali
Charles-François Natali added the comment: So, should I commit this? The change is really trivial. LGTM. This should be applied to 2.7. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14574

[issue14574] SocketServer doesn't handle client disconnects properly

2012-12-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset df51cb946d27 by Kristján Valur Jónsson in branch '2.7': Issue #14574: Ignore socket errors raised when flushing a connection on close. http://hg.python.org/cpython/rev/df51cb946d27 -- nosy: +python-dev

[issue14574] SocketServer doesn't handle client disconnects properly

2012-12-25 Thread Kristján Valur Jónsson
Changes by Kristján Valur Jónsson krist...@ccpgames.com: -- resolution: - fixed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14574 ___ ___

[issue14574] SocketServer doesn't handle client disconnects properly

2012-12-25 Thread Andrew Svetlov
Andrew Svetlov added the comment: Not clean to me: has python3 the same bug? -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14574 ___

[issue14574] SocketServer doesn't handle client disconnects properly

2012-12-25 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Semantically, but I am told that due to py3k's different file buffering, that those errors don't percolate through. According to Charles-Francois' post from apr, 14th: Note that Python 3.3 doesn't have this problem. --

[issue14574] SocketServer doesn't handle client disconnects properly

2012-10-05 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: although I'd prefer a BSD errno example, such as ECONNRESET, instead of a winsock one Are you referring to the comment where I mention ECONNABORTED? That is a regular unix error (windows version is WSAECONNABORTED). This error occurs when the local

[issue14574] SocketServer doesn't handle client disconnects properly

2012-10-05 Thread Charles-François Natali
Charles-François Natali added the comment: Are you referring to the comment where I mention ECONNABORTED? That is a regular unix error (windows version is WSAECONNABORTED). This error occurs when the local stack decides to kill the connection, as opposed to ECONNRESET which occurs on

[issue14574] SocketServer doesn't handle client disconnects properly

2012-10-04 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Clearly, the finish call is intended to be called, and I think the documentation is in error. However, the finish call should also be able to cope with the connection having been reset and handle such errors as may occur. --

[issue14574] SocketServer doesn't handle client disconnects properly

2012-10-04 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Please consider the attached patch and see if it solves the issue. -- keywords: +patch Added file: http://bugs.python.org/file27414/socketserver.patch ___ Python tracker rep...@bugs.python.org

[issue14574] SocketServer doesn't handle client disconnects properly

2012-10-04 Thread Charles-François Natali
Charles-François Natali added the comment: Please consider the attached patch and see if it solves the issue. The patch looks OK (although I'd prefer a BSD errno example, such as ECONNRESET, instead of a winsock one). We should also update the documentation that states that in finish() won't

[issue14574] SocketServer doesn't handle client disconnects properly

2012-10-03 Thread Mike Putnam
Changes by Mike Putnam m...@theputnams.net: -- nosy: +mikeputnam ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14574 ___ ___ Python-bugs-list

[issue14574] SocketServer doesn't handle client disconnects properly

2012-04-15 Thread Kristján Valur Jónsson
Kristján Valur Jónsson krist...@ccpgames.com added the comment: I think this needs serious consideration. There needs to be an socket error case cleanup path that releases resources but ignores further socket errors. -- ___ Python tracker

[issue14574] SocketServer doesn't handle client disconnects properly

2012-04-14 Thread Kristján Valur Jónsson
Changes by Kristján Valur Jónsson krist...@ccpgames.com: -- nosy: +kristjan.jonsson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14574 ___ ___

[issue14574] SocketServer doesn't handle client disconnects properly

2012-04-14 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14574 ___ ___ Python-bugs-list mailing

[issue14574] SocketServer doesn't handle client disconnects properly

2012-04-14 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: Thanks for the report. Several things are going on here: 1. Even though socketserver's StreamRequestHandler uses unbuffered wfile for the socket class StreamRequestHandler(BaseRequestHandler): [...] rbufsize = -1 wbufsize

[issue14574] SocketServer doesn't handle client disconnects properly

2012-04-14 Thread Vladan Djeric
Vladan Djeric vladandje...@gmail.com added the comment: Thank you for taking a look Charles-François. I should note that catching the first exception in the request handler and then calling self.wfile.close() wouldn't fully solve the issue. The self.wfile.close() call would throw another

[issue14574] SocketServer doesn't handle client disconnects properly

2012-04-13 Thread Vlad
New submission from Vlad vladandje...@gmail.com: When dealing with a new connection, SocketServer.BaseRequestHandler.__init__ first calls the request handler (self.handle below) and then calls cleanup code which closes the connection (self.finish below). class BaseRequestHandler: def