diff options
Diffstat (limited to 'src/modules/m_http.cpp')
-rw-r--r-- | src/modules/m_http.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/modules/m_http.cpp b/src/modules/m_http.cpp index 6cb95fa55..dbd1fbecd 100644 --- a/src/modules/m_http.cpp +++ b/src/modules/m_http.cpp @@ -113,11 +113,15 @@ class ModuleHttp : public Module void CreateListener() { http = new HttpSocket(this->bindip, this->port, true, 0, &index); - Srv->AddSocket(http); + if ((http) && (http->GetState() == I_LISTENING)) + { + Srv->AddSocket(http); + } } ModuleHttp(Server* Me) : Module::Module(Me) { + Srv = Me; ReadConfig(); CreateListener(); } |