From 9cb28c21b4a80aa9f29097f6bb1b8b6c23446ddc Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 22 Jul 2022 13:01:52 +0200 Subject: Use bounded channels on receive side for backpressure --- src/error.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/error.rs') diff --git a/src/error.rs b/src/error.rs index 665647c..f374341 100644 --- a/src/error.rs +++ b/src/error.rs @@ -28,6 +28,9 @@ pub enum Error { #[error(display = "Framing protocol error")] Framing, + #[error(display = "Request ID collision")] + IdCollision, + #[error(display = "{}", _0)] Message(String), @@ -56,6 +59,7 @@ impl Error { Self::Framing => 13, Self::NoHandler => 20, Self::ConnectionClosed => 21, + Self::IdCollision => 22, Self::Handshake(_) => 30, Self::VersionMismatch(_) => 31, Self::Remote(c, _) => *c, -- cgit v1.2.3