[Async-sig] Read remaining and ready buffer once it has been closed by your peer
Pau Freixes
pfreixes at gmail.com
Wed Jul 5 17:07:23 EDT 2017
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
More information about the Async-sig
mailing list