From 48a1c7320cab7d6542784afd7ecc35e0f5ef8043 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Fri, 21 Dec 2018 13:00:26 -0800 Subject: [PATCH] fix io handling code --- actix-utils/src/framed.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/actix-utils/src/framed.rs b/actix-utils/src/framed.rs index cdceeaf43..d91af822f 100644 --- a/actix-utils/src/framed.rs +++ b/actix-utils/src/framed.rs @@ -187,7 +187,7 @@ where enum TransportState>, U: Encoder + Decoder> { Processing, Error(FramedTransportError), - EncoderError(FramedTransportError), + FramedError(FramedTransportError), Stopping, } @@ -263,7 +263,7 @@ where Ok(Async::Ready(Some(el))) => el, Err(err) => { self.state = - TransportState::Error(FramedTransportError::Decoder(err)); + TransportState::FramedError(FramedTransportError::Decoder(err)); return true; } Ok(Async::NotReady) => return false, @@ -310,7 +310,7 @@ where Ok(Async::Ready(Some(msg))) => match msg { Ok(msg) => { if let Err(err) = self.framed.force_send(msg) { - self.state = TransportState::EncoderError( + self.state = TransportState::FramedError( FramedTransportError::Encoder(err), ); return true; @@ -334,7 +334,7 @@ where Err(err) => { debug!("Error sending data: {:?}", err); self.state = - TransportState::EncoderError(FramedTransportError::Encoder(err)); + TransportState::FramedError(FramedTransportError::Encoder(err)); return true; } Ok(Async::Ready(_)) => (), @@ -378,7 +378,7 @@ where Ok(Async::NotReady) } } - TransportState::EncoderError(err) => Err(err), + TransportState::FramedError(err) => Err(err), TransportState::Stopping => Ok(Async::Ready(())), } }