Increased network connection timeouts

This commit is contained in:
BenDroid 2018-03-02 20:48:15 +01:00
parent 9e37fa98fd
commit 80ca028e39
2 changed files with 2 additions and 2 deletions

View file

@ -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)); setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (char*)&yes, sizeof(yes));
struct timeval timeout; struct timeval timeout;
timeout.tv_sec = 5; timeout.tv_sec = 10;
timeout.tv_usec = 0; timeout.tv_usec = 0;
setsockopt (sock, SOL_SOCKET, SO_RCVTIMEO, (char *)&timeout, sizeof(timeout)); setsockopt (sock, SOL_SOCKET, SO_RCVTIMEO, (char *)&timeout, sizeof(timeout));

View file

@ -44,7 +44,7 @@ bool Httpd::start()
} }
m_daemon = MHD_start_daemon(MHD_USE_SELECT_INTERNALLY, static_cast<uint16_t>(m_options->ccPort()), nullptr, nullptr, &Httpd::handler, m_daemon = MHD_start_daemon(MHD_USE_SELECT_INTERNALLY, static_cast<uint16_t>(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) { if (!m_daemon) {
LOG_ERR("HTTP Daemon failed to start."); LOG_ERR("HTTP Daemon failed to start.");