- Error:
SerovalLiveStreamError - Step: none
- Fields:
reason, one ofconsumed,pending,readingorclosed.
What it means
A live stream method was called at a time the stream does not allow. This error is never wrapped, so its production message has no step.
Common causes
consumed:consume()was called on a stream that already has a reader. Serializing a live stream also reads it.pending:write,closeorfailwas called while an earlier event was not accepted yet.reading: the consumer calledread()while an earlierread()had not settled.closed: a method was called after the stream ended.
How to fix it
- Await each
writebefore the next one. - Await each
read(), and callaccept(), before the nextread(). - Give each live stream one reader. Make a new stream for each request.