summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-11-03 15:34:20 +0100
committerAttila Molnar <attilamolnar@hush.com>2014-11-03 15:34:20 +0100
commit7ac816f78c8ae39776e100df74b253dac70bf760 (patch)
tree6d4fe797ecf9fef697811e816004649a239d02d0 /src/modules
parent48f8f79317a04891e2becd859363add6eb2d6444 (diff)
m_httpd Always timeout connections, set default timeout to 10 seconds
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_httpd.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp
index bf372f34f..98dfcc387 100644
--- a/src/modules/m_httpd.cpp
+++ b/src/modules/m_httpd.cpp
@@ -366,7 +366,7 @@ class ModuleHttpServer : public Module
void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE
{
ConfigTag* tag = ServerInstance->Config->ConfValue("httpd");
- timeoutsec = tag->getInt("timeout");
+ timeoutsec = tag->getInt("timeout", 10, 1);
}
ModResult OnAcceptConnection(int nfd, ListenSocket* from, irc::sockets::sockaddrs* client, irc::sockets::sockaddrs* server) CXX11_OVERRIDE
@@ -382,9 +382,6 @@ class ModuleHttpServer : public Module
void OnBackgroundTimer(time_t curtime) CXX11_OVERRIDE
{
- if (!timeoutsec)
- return;
-
time_t oldest_allowed = curtime - timeoutsec;
for (std::set<HttpServerSocket*>::const_iterator i = sockets.begin(); i != sockets.end(); )
{