Commit 9cbedc14 authored by Johan Ström's avatar Johan Ström

agohttp: avoid segfault if not fully started

parent a5c180bd
......@@ -527,6 +527,9 @@ void AgoHttp::start() {
}
void AgoHttp::shutdown() {
if(state == Stopped)
return;
// Close all listeners
AGO_DEBUG() << "Closing all listener sockets";
if(state == Running) {
......@@ -536,6 +539,9 @@ void AgoHttp::shutdown() {
}
void AgoHttp::close() {
if(state == Stopped)
return;
AGO_TRACE() << "Waiting for webserver threads";
mongooseThread.join();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment