diff --git a/lib/src/HttpAppFrameworkImpl.cc b/lib/src/HttpAppFrameworkImpl.cc index 8d9cf683..676b86f6 100755 --- a/lib/src/HttpAppFrameworkImpl.cc +++ b/lib/src/HttpAppFrameworkImpl.cc @@ -351,6 +351,7 @@ void HttpAppFrameworkImpl::run() #ifdef __linux__ _loop.resetTimerQueue(); #endif + _loop.resetAfterFork(); } //set relaunching if (_relaunchOnError) @@ -373,6 +374,7 @@ void HttpAppFrameworkImpl::run() sleep(1); LOG_INFO << "start new process"; } + _loop.resetAfterFork(); } //set logger diff --git a/lib/src/HttpAppFrameworkImpl.h b/lib/src/HttpAppFrameworkImpl.h index 0006c4c9..7bbd7a65 100644 --- a/lib/src/HttpAppFrameworkImpl.h +++ b/lib/src/HttpAppFrameworkImpl.h @@ -93,8 +93,8 @@ class HttpAppFrameworkImpl : public HttpAppFramework virtual trantor::EventLoop *loop() override; virtual void quit() override { - assert(_loop.isRunning()); - _loop.quit(); + if (_loop.isRunning()) + _loop.quit(); } #if USE_ORM virtual orm::DbClientPtr getDbClient(const std::string &name = "default") override; diff --git a/trantor b/trantor index 4dade425..49c63116 160000 --- a/trantor +++ b/trantor @@ -1 +1 @@ -Subproject commit 4dade42572b5fc053b4dbe21eede15d5b0f55197 +Subproject commit 49c6311642f38070d34dd1a4f0408f8f41a5ebfc