diff --git a/CHANGES.md b/CHANGES.md index b88cec9f9..e7812472c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,11 @@ # Changes +## 0.3.3 (2018-01-xx) + +* Stop processing any events after context stop + +* Re-enable write back pressure for h1 connections + ## 0.3.2 (2018-01-21) * Fix HEAD requests handling diff --git a/src/context.rs b/src/context.rs index 5187dd0b9..76be616cf 100644 --- a/src/context.rs +++ b/src/context.rs @@ -18,7 +18,7 @@ use httprequest::HttpRequest; pub trait ActorHttpContext: 'static { fn disconnected(&mut self); - fn poll(&mut self) -> Poll>, Error>; + fn poll(&mut self) -> Poll>, Error>; } #[derive(Debug)] @@ -40,7 +40,7 @@ impl Frame { pub struct HttpContext where A: Actor>, { inner: ContextImpl, - stream: Option>, + stream: Option>, request: HttpRequest, disconnected: bool, } @@ -201,7 +201,7 @@ impl ActorHttpContext for HttpContext where A: Actor, self.stop(); } - fn poll(&mut self) -> Poll>, Error> { + fn poll(&mut self) -> Poll>, Error> { let ctx: &mut HttpContext = unsafe { std::mem::transmute(self as &mut HttpContext) }; diff --git a/src/server/h1writer.rs b/src/server/h1writer.rs index e423f8758..09f1b45d4 100644 --- a/src/server/h1writer.rs +++ b/src/server/h1writer.rs @@ -179,7 +179,6 @@ impl Writer for H1Writer { if self.flags.contains(Flags::STARTED) { // TODO: add warning, write after EOF self.encoder.write(payload)?; - return Ok(WriterState::Done) } else { // might be response to EXCEPT self.buffer.extend_from_slice(payload.as_ref()) diff --git a/src/ws/context.rs b/src/ws/context.rs index 77d8a8ae2..749886744 100644 --- a/src/ws/context.rs +++ b/src/ws/context.rs @@ -23,7 +23,7 @@ use ws::proto::{OpCode, CloseCode}; pub struct WebsocketContext where A: Actor>, { inner: ContextImpl, - stream: Option>, + stream: Option>, request: HttpRequest, disconnected: bool, } @@ -226,7 +226,7 @@ impl ActorHttpContext for WebsocketContext where A: Actor Poll>, Error> { + fn poll(&mut self) -> Poll>, Error> { let ctx: &mut WebsocketContext = unsafe { mem::transmute(self as &mut WebsocketContext) };