[issue7322] Socket timeout can cause file-like readline() method to lose data

Ross Lagerwall report at bugs.python.org
Thu Jan 13 21:25:08 CET 2011


Ross Lagerwall <rosslagerwall at gmail.com> added the comment:

> That complicates things quite a bit,
> especially given that it has to be grafted on at least two layers of the
> IO stack (the raw IO layer, and the buffered IO layer).

Also the TextIO layer I think.

> That's my opinion too. So, instead, of doing the above surgery inside
> the IO stack, the SocketIO layer could detect the timeout and disallow
> further access. What do you think?

So after a timeout occurs the file-object basically becomes worthless? Would it make sense to automatically call the close method of the file-object after this occurs?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7322>
_______________________________________


More information about the Python-bugs-list mailing list