Closed suhrm closed 2 years ago
QUIC errors don't map very gracefully into io::Error
. For clearer diagnostics, look at the Display
output for the error, or downcast to the underlying quinn error, or avoid converting into io::Error
in the first place.
It looks like your real error is quinn::WriteError::Stopped
, which is documented as:
The peer is no longer accepting data on this stream
Note that this does not imply anything about the state of the connection, which may well be doing perfectly fine.
Streams are stopped when the receiver calls RecvStream::stop
or when the RecvStream
is dropped, so you should investigate why that might be happening on your server.
Thanks for the quick reply I will take a look at the things you have suggested :).
Turned out the library i used for codecs in FrameWrite/FrameRead has a bug which throws an error that causes the RecvStream on the server to be dropped. After changing to LengthDelimitedCodec the drop does not occur.
Thanks again for the 'quic' response.
Hi I am current trying to use quinn in an application where the I would like to allocate quic bidi streams to specific application streams. I have got a client server up and running using the example and docs provide. However after a certain number of transmission between the client and server I receive an Err Io(Custom { kind: ConnectionReset, error: Stopped(0) }) on subsequent writes to the stream, As far as I am aware of I have nothing that should explicitly reset the connection in my application.
Furthermore the stream that fails is id 0, I remember that this was the crypto stream a long time ago and could be the issue but I have not really followed the resent developments of QUIC.
The client/server connection handlers have the following structure
Client
Server:
Thanks in advance.
Regards.
Rasmus Suhr Mogensen