1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-11-24 16:02:59 +01:00

always poll stream or actor for the first time

This commit is contained in:
Nikolay Kim 2018-03-15 17:11:49 -07:00
parent 484b00a0f9
commit 61970ab190

View File

@ -482,10 +482,14 @@ impl<S: 'static, H> ProcessResponse<S, H> {
}
match self.resp.replace_body(Body::Empty) {
Body::Streaming(stream) =>
self.iostate = IOState::Payload(stream),
Body::Actor(ctx) =>
self.iostate = IOState::Actor(ctx),
Body::Streaming(stream) => {
self.iostate = IOState::Payload(stream);
continue
},
Body::Actor(ctx) => {
self.iostate = IOState::Actor(ctx);
continue
},
_ => (),
}