Antoine Pitrou <pit...@free.fr> added the comment:

This is an interesting approach. The problem is that AFAICT the issue is not 
limited to readline. If you call e.g. read(10000) and the socket times out 
after having returned the first 5000 bytes, then those 5000 bytes might get 
lost as well (depending on specifics e.g. buffer size in the IO stack).

Generally there is no guarantee that a buffered object works "properly" when 
the raw IO object raises some exception intermittently; perhaps this should be 
fixed in a systemic way, although this would complicate things quite a bit.

Also, I don't think people try to reuse a socket after a timeout (or even try 
to salvage whatever data could be read before the timeout); usually they would 
instead abort the connection and treat the remote resource as unavailable. IMO, 
that's the one obvious use case for socket timeouts.

----------
nosy: +amaury.forgeotdarc
stage: needs patch -> patch review
versions: +Python 3.3 -Python 2.7, Python 3.1, Python 3.2

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7322>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to