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

Antoine Pitrou report at bugs.python.org
Thu Jan 13 21:35:10 CET 2011


Antoine Pitrou <pitrou at free.fr> added the comment:

> > 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?

Actually, we only need to forbid further reads (writes would always
work). I think we should still let the user call the close method
themselves.

----------

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


More information about the Python-bugs-list mailing list