Author pitrou
Recipients amaury.forgeotdarc, beazley, dabeaz, gregory.p.smith, loewis, ned.deily, pitrou, rosslagerwall, roysmith
Date 2011-01-13.14:24:09
SpamBayes Score 1.89355e-11
Marked as misclassified No
Message-id <1294928654.88.0.951092856764.issue7322@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2011-01-13 14:24:14pitrousetrecipients: + pitrou, loewis, beazley, gregory.p.smith, amaury.forgeotdarc, roysmith, ned.deily, dabeaz, rosslagerwall
2011-01-13 14:24:14pitrousetmessageid: <1294928654.88.0.951092856764.issue7322@psf.upfronthosting.co.za>
2011-01-13 14:24:09pitroulinkissue7322 messages
2011-01-13 14:24:09pitroucreate