diff --git a/src/ws/context.rs b/src/ws/context.rs index 0444db997..ffdd0b559 100644 --- a/src/ws/context.rs +++ b/src/ws/context.rs @@ -110,11 +110,9 @@ where } /// Create a new Websocket context - pub fn with_factory(req: HttpRequest, stream: WsStream

, f: F) -> Body + pub fn with_factory(req: HttpRequest, f: F) -> Body where F: FnOnce(&mut Self) -> A + 'static, - A: StreamHandler, - P: Stream + 'static, { let mb = Mailbox::default(); let mut ctx = WebsocketContext { @@ -123,7 +121,6 @@ where request: req, disconnected: false, }; - ctx.add_stream(stream); let act = f(&mut ctx); Body::Actor(Box::new(WebsocketContextFut::new(ctx, act, mb)))