diff options
| author | 2016-08-24 12:27:51 +0200 | |
|---|---|---|
| committer | 2016-08-24 12:27:51 +0200 | |
| commit | b200104cf2c61465acecaca111e3ec727fc3b954 (patch) | |
| tree | 818f420f734ad68a6c819b18b34fc93db38d7643 /src/modules/m_httpd.cpp | |
| parent | Call IOHookProviders after the socket has been added to the SocketEngine in U... (diff) | |
Check for errors after calling IOHookProvider::OnAccept()
Diffstat (limited to 'src/modules/m_httpd.cpp')
| -rw-r--r-- | src/modules/m_httpd.cpp | 12 |
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() |
