1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-25 09:59:21 +02:00

added new cancel_future_on_stop

This commit is contained in:
Nikolay Kim
2017-10-30 14:49:20 -07:00
parent e3c058c96e
commit 58de9dcf56
4 changed files with 11 additions and 6 deletions

View File

@ -211,10 +211,10 @@ fn main() {
// redirect to websocket.html
.resource("/", |r|
r.handler(Method::GET, |req, payload, state| {
httpcodes::HTTPFound
.builder()
.header("LOCATION", "/static/websocket.html")
.body(Body::Empty)
Ok(httpcodes::HTTPFound
.builder()
.header("LOCATION", "/static/websocket.html")
.body(Body::Empty)?)
}))
// websocket
.resource("/ws/", |r| r.get::<WsChatSession>())