From 38f06ac4caefb08e800d7c873be7c3854739ab5f Mon Sep 17 00:00:00 2001 From: BenDroid Date: Fri, 2 Mar 2018 20:48:15 +0100 Subject: [PATCH] Increased network connection timeouts --- src/3rdparty/cpp-httplib/httplib.h | 2 +- src/cc/Httpd.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/3rdparty/cpp-httplib/httplib.h b/src/3rdparty/cpp-httplib/httplib.h index 4b7b2177..d3c46c7c 100644 --- a/src/3rdparty/cpp-httplib/httplib.h +++ b/src/3rdparty/cpp-httplib/httplib.h @@ -358,7 +358,7 @@ socket_t create_socket(const char* host, int port, Fn fn, int socket_flags = 0) setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (char*)&yes, sizeof(yes)); struct timeval timeout; - timeout.tv_sec = 5; + timeout.tv_sec = 10; timeout.tv_usec = 0; setsockopt (sock, SOL_SOCKET, SO_RCVTIMEO, (char *)&timeout, sizeof(timeout)); diff --git a/src/cc/Httpd.cpp b/src/cc/Httpd.cpp index 31bb6784..35f9a139 100644 --- a/src/cc/Httpd.cpp +++ b/src/cc/Httpd.cpp @@ -44,7 +44,7 @@ bool Httpd::start() } m_daemon = MHD_start_daemon(MHD_USE_SELECT_INTERNALLY, static_cast(m_options->ccPort()), nullptr, nullptr, &Httpd::handler, - this, MHD_OPTION_CONNECTION_TIMEOUT, (unsigned int) 10, MHD_OPTION_END); + this, MHD_OPTION_CONNECTION_TIMEOUT, (unsigned int) 30, MHD_OPTION_END); if (!m_daemon) { LOG_ERR("HTTP Daemon failed to start.");