Fix a bug in the getIOLoop method (#1014)

This commit is contained in:
An Tao 2021-09-07 21:42:08 +08:00 committed by GitHub
parent cdabca9de5
commit 94c7add7a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -239,7 +239,11 @@ void ListenerManager::startListening()
trantor::EventLoop *ListenerManager::getIOLoop(size_t id) const
{
#ifdef __linux__
auto const n = listeningloopThreads_.size();
#else
auto const n = ioLoopThreadPoolPtr_->size();
#endif
if (0 == n)
{
LOG_WARN << "Please call getIOLoop() after drogon::app().run()";

@ -1 +1 @@
Subproject commit 81983fa57d2a1d73cc2779261c064fe9f031ff2f
Subproject commit 3b0745a09479d9a6d0870e878face070e3aec981