1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-11-27 17:22:57 +01:00

no need to store disconnected state on task

This commit is contained in:
Nikolay Kim 2017-11-30 14:44:58 -08:00
parent 6e138bf373
commit 271a292ea5

View File

@ -149,7 +149,6 @@ pub struct Task {
iostate: IOState,
stream: TaskStream,
drain: Vec<Rc<RefCell<DrainFut>>>,
disconnected: bool,
middlewares: Option<MiddlewaresResponse>,
}
@ -162,7 +161,6 @@ impl Default for Task {
iostate: IOState::Response,
drain: Vec::new(),
stream: TaskStream::None,
disconnected: false,
middlewares: None }
}
}
@ -175,7 +173,6 @@ impl Task {
iostate: IOState::Response,
drain: Vec::new(),
stream: TaskStream::None,
disconnected: false,
middlewares: None }
}
@ -218,7 +215,6 @@ impl Task {
}
pub(crate) fn disconnected(&mut self) {
self.disconnected = true;
if let TaskStream::Context(ref mut ctx) = self.stream {
ctx.disconnected();
}