1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-24 00:21:08 +01:00
This commit is contained in:
Nikolay Kim 2017-11-04 14:07:15 -07:00
parent e9e247217a
commit 3f649b8e07
2 changed files with 4 additions and 3 deletions

View File

@ -252,7 +252,7 @@ impl<T, A, H> Http1<T, A, H>
// check for parse error
if self.tasks.is_empty() {
if self.h2 {
return Ok(Async::Ready(Http1Result::Upgrade))
return Ok(Async::Ready(Http1Result::Switch))
}
if self.error || self.keepalive_timer.is_none() {
return Ok(Async::Ready(Http1Result::Done))

View File

@ -190,12 +190,13 @@ impl Task {
}
}
// use exiting frames
// if task is paused, write buffer probably is full
if self.state != TaskRunningState::Paused {
// process exiting frames
while let Some(frame) = self.frames.pop_front() {
trace!("IO Frame: {:?}", frame);
let res = match frame {
Frame::Message(mut response) => {
Frame::Message(response) => {
trace!("Prepare message status={:?}", response.status);
// run middlewares