Read remaining and ready buffer once it has been closed by your peer
![](https://secure.gravatar.com/avatar/cf278a5382dde75bd7391751754e80b3.jpg?s=120&d=mm&r=g)
5 Jul
2017
5 Jul
'17
4:07 p.m.
Hi guys, The current implementation of StreamReader does not allow to read the remaining buffer if has had an exception and there was no waiters before to read the data. IMHO this is not the best way to handle this situation, the developer should be able to access to the remaining and ready buffer in somehow. For example, this data might bring some important stuff related to the reason of the exception. Ive just opened a bug [1] and made a PR with a simple proposal [2] with a very basic rationale: Meanwhile, there is data in the buffer still to be processed, the StreamReader shouldn't raise the final exception. Thoughts ? [1] http://bugs.python.org/issue30861 [2] https://github.com/python/cpython/pull/2593 -- --pau
2611
Age (days ago)
2611
Last active (days ago)
0 comments
1 participants
participants (1)
-
Pau Freixes