increase default timeout from 1 to 30 seconds

This commit is contained in:
panicbit 2020-11-18 22:46:18 +01:00
parent 65b35a48d7
commit fffada14e3
1 changed files with 2 additions and 2 deletions

View File

@ -125,7 +125,7 @@ pub struct Builder<A> {
impl<A: ToSocketAddrs> Builder<A> {
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<A: ToSocketAddrs> Builder<A> {
/// 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