From 112a7b6b1bbfd834dd933372e5a2bf39e2a46867 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Wed, 26 Dec 2018 11:50:07 -0800 Subject: [PATCH] fix error handling --- actix-utils/CHANGES.md | 5 +++++ actix-utils/Cargo.toml | 4 ++-- actix-utils/src/framed.rs | 4 +++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/actix-utils/CHANGES.md b/actix-utils/CHANGES.md index b859a7dc..851d62b9 100644 --- a/actix-utils/CHANGES.md +++ b/actix-utils/CHANGES.md @@ -1,5 +1,10 @@ # Changes +## [0.1.1] - 2018-xx-xx + +* Fix framed transport error handling + + ## [0.1.0] - 2018-12-09 * Move utils services to separate crate diff --git a/actix-utils/Cargo.toml b/actix-utils/Cargo.toml index e6303e25..45c2e20f 100644 --- a/actix-utils/Cargo.toml +++ b/actix-utils/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "actix-utils" -version = "0.1.0" +version = "0.1.1" authors = ["Nikolay Kim "] description = "Actix utils - various actix net related services" keywords = ["network", "framework", "async", "futures"] @@ -18,7 +18,7 @@ name = "actix_utils" path = "src/lib.rs" [dependencies] -actix-service = "0.1.1" +actix-service = "0.1.2" actix-codec = "0.1.0" actix-rt = "0.1.0" bytes = "0.4" diff --git a/actix-utils/src/framed.rs b/actix-utils/src/framed.rs index d91af822..b8a2209e 100644 --- a/actix-utils/src/framed.rs +++ b/actix-utils/src/framed.rs @@ -371,7 +371,9 @@ where } } TransportState::Error(err) => { - if self.poll_response() || !self.framed.is_write_buf_empty() { + if self.framed.is_write_buf_empty() + || (self.poll_response() || self.framed.is_write_buf_empty()) + { Err(err) } else { self.state = TransportState::Error(err);