1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-31 08:57:00 +02:00

use new actix context api

This commit is contained in:
Nikolay Kim
2018-07-04 17:04:23 +06:00
parent b6d26c9faf
commit 4c5a63965e
6 changed files with 119 additions and 151 deletions

View File

@@ -179,10 +179,8 @@ where
let mut resp = handshake(req)?;
let stream = WsStream::new(req.payload());
let mut ctx = WebsocketContext::new(req.clone(), actor);
ctx.add_stream(stream);
Ok(resp.body(ctx))
let body = WebsocketContext::new(req.clone(), actor, stream);
Ok(resp.body(body))
}
/// Prepare `WebSocket` handshake response.