StreamReader read with an exception '..incoming data'
dpineiden opened this issue · 2 comments
Hello
I'm implementing a server with in/out data and using the start_unix_server coroutine. It's give correctly the reader and writer.
I'm using the reader with
await reader.read(n=bs)
In a method who read a data stream.
In general the system works fine, but raise this exception:
"RuntimeError: read() called while another coroutine is already waiting for incoming data"
my project is: https://gitlab.com/pineiden/gus/blob/master/gnc_socket.py
On documentation, there are no advise about how to use read() correctly, so i used like a normal coroutine.
So, the question is about how to use that Streamreader and why it raise the exception.
Thanks!
PD: To test, run test2_server.py, and test_client.py
Hi,
The link you provided points to a 404.
This is likely a bug in your code: the error you receive means that you're trying to read twice on the same StreamReader concurrently, which is forbidden for consistency.
Good luck!
I think that this issue can be closed.