1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-12-28 19:10:36 +00:00

fix error handling

This commit is contained in:
Nikolay Kim 2018-12-26 11:50:07 -08:00
parent 48a1c7320c
commit 112a7b6b1b
3 changed files with 10 additions and 3 deletions

View file

@ -1,5 +1,10 @@
# Changes # Changes
## [0.1.1] - 2018-xx-xx
* Fix framed transport error handling
## [0.1.0] - 2018-12-09 ## [0.1.0] - 2018-12-09
* Move utils services to separate crate * Move utils services to separate crate

View file

@ -1,6 +1,6 @@
[package] [package]
name = "actix-utils" name = "actix-utils"
version = "0.1.0" version = "0.1.1"
authors = ["Nikolay Kim <fafhrd91@gmail.com>"] authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
description = "Actix utils - various actix net related services" description = "Actix utils - various actix net related services"
keywords = ["network", "framework", "async", "futures"] keywords = ["network", "framework", "async", "futures"]
@ -18,7 +18,7 @@ name = "actix_utils"
path = "src/lib.rs" path = "src/lib.rs"
[dependencies] [dependencies]
actix-service = "0.1.1" actix-service = "0.1.2"
actix-codec = "0.1.0" actix-codec = "0.1.0"
actix-rt = "0.1.0" actix-rt = "0.1.0"
bytes = "0.4" bytes = "0.4"

View file

@ -371,7 +371,9 @@ where
} }
} }
TransportState::Error(err) => { 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) Err(err)
} else { } else {
self.state = TransportState::Error(err); self.state = TransportState::Error(err);