1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-10-22 09:53:56 +00:00

mark context as modified after writing data

This commit is contained in:
Nikolay Kim 2018-02-27 18:05:06 -08:00
parent e2c8f17c2c
commit 1e2aa4fc90
2 changed files with 3 additions and 0 deletions

View file

@ -164,6 +164,7 @@ impl<A, S> HttpContext<A, S> where A: Actor<Context=Self> {
self.stream = Some(SmallVec::new());
}
self.stream.as_mut().map(|s| s.push(frame));
self.inner.modify();
}
/// Handle of the running future

View file

@ -112,6 +112,7 @@ impl<A, S> WebsocketContext<A, S> where A: Actor<Context=Self> {
}
let stream = self.stream.as_mut().unwrap();
stream.push(ContextFrame::Chunk(Some(data)));
self.inner.modify();
} else {
warn!("Trying to write to disconnected response");
}
@ -179,6 +180,7 @@ impl<A, S> WebsocketContext<A, S> where A: Actor<Context=Self> {
self.stream = Some(SmallVec::new());
}
self.stream.as_mut().map(|s| s.push(frame));
self.inner.modify();
}
/// Handle of the running future