From 329a4a6159f1972ff5ec7bc2db26430f26dc61f3 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Thu, 24 May 2018 14:31:31 +0200 Subject: Lower default timeout from 120s to 30s 120s is an insanely high default time out, lower it to 30s to make things a bit nicer. --- methods/basehttp.cc | 2 +- methods/ftp.cc | 2 +- methods/http.cc | 4 ++-- methods/rsh.cc | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'methods') diff --git a/methods/basehttp.cc b/methods/basehttp.cc index 3a73d04c6..3d95ba7df 100644 --- a/methods/basehttp.cc +++ b/methods/basehttp.cc @@ -250,7 +250,7 @@ bool RequestState::HeaderLine(string const &Line) /*{{{*/ /*}}}*/ // ServerState::ServerState - Constructor /*{{{*/ ServerState::ServerState(URI Srv, BaseHttpMethod *Owner) : - ServerName(Srv), TimeOut(120), Owner(Owner) + ServerName(Srv), TimeOut(30), Owner(Owner) { Reset(); } diff --git a/methods/ftp.cc b/methods/ftp.cc index ebe555a04..8213f1b50 100644 --- a/methods/ftp.cc +++ b/methods/ftp.cc @@ -62,7 +62,7 @@ struct AFMap AFMap[] = {{AF_INET,1},{0, 0}}; struct AFMap AFMap[] = {{AF_INET,1},{AF_INET6,2},{0, 0}}; #endif -unsigned long TimeOut = 120; +unsigned long TimeOut = 30; URI Proxy; string FtpMethod::FailFile; int FtpMethod::FailFd = -1; diff --git a/methods/http.cc b/methods/http.cc index 4514c3d60..3862497a8 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -496,7 +496,7 @@ ResultState HttpServerState::Open() return result; result = UnwrapSocks(ServerName.Host, ServerName.Port == 0 ? DefaultPort : ServerName.Port, - Proxy, ServerFd, Owner->ConfigFindI("TimeOut", 120), Owner); + Proxy, ServerFd, Owner->ConfigFindI("TimeOut", 30), Owner); if (result != ResultState::SUCCESSFUL) return result; } @@ -536,7 +536,7 @@ ResultState HttpServerState::Open() } if (Host == Proxy.Host && tls) { - result = UnwrapHTTPConnect(ServerName.Host, ServerName.Port == 0 ? DefaultPort : ServerName.Port, Proxy, ServerFd, Owner->ConfigFindI("TimeOut", 120), Owner); + result = UnwrapHTTPConnect(ServerName.Host, ServerName.Port == 0 ? DefaultPort : ServerName.Port, Proxy, ServerFd, Owner->ConfigFindI("TimeOut", 30), Owner); if (result != ResultState::SUCCESSFUL) return result; } diff --git a/methods/rsh.cc b/methods/rsh.cc index 7f1d1cc69..0da18690b 100644 --- a/methods/rsh.cc +++ b/methods/rsh.cc @@ -32,7 +32,7 @@ #include /*}}}*/ -unsigned long TimeOut = 120; +unsigned long TimeOut = 30; Configuration::Item const *RshOptions = 0; time_t RSHMethod::FailTime = 0; std::string RSHMethod::FailFile; -- cgit v1.2.3