summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/HttpServer.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/HttpServer.cc b/src/HttpServer.cc
index 9fc48c5..44c794e 100644
--- a/src/HttpServer.cc
+++ b/src/HttpServer.cc
@@ -600,8 +600,14 @@ void Balau::HttpServer::start() {
void Balau::HttpServer::stop() {
AAssert(m_started, "Don't stop an HttpServer that hasn't been started");
- reinterpret_cast<HttpListener *>(m_listenerPtr)->stop();
+ HttpListener * listener = reinterpret_cast<HttpListener *>(m_listenerPtr);
+ Events::TaskEvent event(listener);
+ Task::prepare(&event);
+ listener->stop();
m_started = false;
+ Task::yield(&event);
+ IAssert(event.gotSignal(), "HttpServer::stop didn't actually get the listener to stop");
+ event.ack();
}
void Balau::HttpServer::registerAction(Action * action) {