summaryrefslogtreecommitdiff
path: root/src/modules/m_httpd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_httpd.cpp')
-rw-r--r--src/modules/m_httpd.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp
index 64bef70d1..6055d1f77 100644
--- a/src/modules/m_httpd.cpp
+++ b/src/modules/m_httpd.cpp
@@ -76,10 +76,18 @@ class HttpServerSocket : public BufferedSocket, public Timer, public insp::intru
, postsize(0)
, waitingcull(false)
{
- ServerInstance->Timers.AddTimer(this);
-
if ((!via->iohookprovs.empty()) && (via->iohookprovs.back()))
+ {
via->iohookprovs.back()->OnAccept(this, client, server);
+ // IOHook may have errored
+ if (!getError().empty())
+ {
+ AddToCull();
+ return;
+ }
+ }
+
+ ServerInstance->Timers.AddTimer(this);
}
~HttpServerSocket()