X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_httpd.cpp;h=6055d1f77b38d179cff8d508aba840ccd6eaa022;hb=b200104cf2c61465acecaca111e3ec727fc3b954;hp=0b6b2e32b7dcd1c261cb8aa926c4b79b7fbfd2f0;hpb=eef55acb1dbb2ae6c0202fec54e12506c064f892;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp index 0b6b2e32b..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; + } + } - if (via->iohookprov) - via->iohookprov->OnAccept(this, client, server); + ServerInstance->Timers.AddTimer(this); } ~HttpServerSocket()