From 3dd8fdf4505858e5e93863b0bbb3270816c5aaf0 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Fri, 9 Mar 2018 21:40:51 -0800 Subject: [PATCH] fix guide --- guide/src/qs_3_5.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/guide/src/qs_3_5.md b/guide/src/qs_3_5.md index 3f1fff00..077a7731 100644 --- a/guide/src/qs_3_5.md +++ b/guide/src/qs_3_5.md @@ -134,9 +134,10 @@ for full example. Actix can wait for requests on a keep-alive connection. *Keep alive* connection behavior is defined by server settings. - * `Some(75)` - enable 75 sec *keep alive* timer according request and response settings. - * `Some(0)` - disable *keep alive*. - * `None` - Use `SO_KEEPALIVE` socket option. + * `KeepAlive::Timeout(75)` - enable 75 sec *keep alive* timer according + request and response settings. + * `KeepAlive::Disabled` - disable *keep alive*. + * `KeepAlive::Tcp(75)` - Use `SO_KEEPALIVE` socket option. ```rust # extern crate actix_web; @@ -147,7 +148,7 @@ fn main() { HttpServer::new(|| Application::new() .resource("/", |r| r.h(httpcodes::HttpOk))) - .keep_alive(None); // <- Use `SO_KEEPALIVE` socket option. + .keep_alive(server::KeepAlive::Tcp(75)); // <- Use `SO_KEEPALIVE` socket option. } ```