[issue7322] Socket timeout can cause file-like readline() method to lose data
Ross Lagerwall
report at bugs.python.org
Fri Dec 31 09:15:16 CET 2010
Ross Lagerwall <rosslagerwall at gmail.com> added the comment:
Attached is a patch which fixes the issue.
Instead of allowing the readline method to lose data, it adds a check to SocketIO.readinto() to ensure that the socket does not have a timeout and throws an IOError if it does. Also does the same for SocketIO.write().
I think this is a better approach - just failing immediately when a readline on a nonblocking socket occurs instead of failing sometimes and losing data.
----------
keywords: +patch
nosy: +rosslagerwall
Added file: http://bugs.python.org/file20202/7322_v1.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7322>
_______________________________________
More information about the Python-bugs-list
mailing list