From fffada14e36418471159320c60cbcb0692a6a6de Mon Sep 17 00:00:00 2001 From: panicbit Date: Wed, 18 Nov 2020 22:46:18 +0100 Subject: [PATCH] increase default timeout from 1 to 30 seconds --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 2dadbc4..066ce28 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -125,7 +125,7 @@ pub struct Builder { impl Builder { fn bind(addr: A) -> Self { - Self { addr, timeout: Duration::from_secs(1) } + Self { addr, timeout: Duration::from_secs(30) } } /// Set the timeout on incoming requests @@ -139,7 +139,7 @@ impl Builder { /// If you would like a timeout for your code itself, please use /// [`tokio::time::Timeout`] to implement it internally. /// - /// The default timeout is 1 second. + /// The default timeout is 30 seconds. pub fn set_timeout(mut self, timeout: Duration) -> Self { self.timeout = timeout; self