Open TYUTthelastone opened 1 month ago
HttpServer启动的时候,启用SSL的线程是app().run()的线程,enableSSL触发的runtime_error被HttpServer所属的loop捕获了,导致assertInLoopThread()断言了。
https://github.com/drogonframework/drogon/blob/3fce70b535dcee9efb2f5f805d8a81d04a5adeb3/lib/src/ListenerManager.cc#L78-L193
应该是enable中抛出异常后httpserver析构导致的,具体析构流程是 ~HttpServer->~TcpServer->~Acceptor->Channel::disableAll()->Channel::update()->EventLoop::updateChannel()->EventLoop::assertInLoopThread()
HttpServer启动的时候,启用SSL的线程是app().run()的线程,enableSSL触发的runtime_error被HttpServer所属的loop捕获了,导致assertInLoopThread()断言了。
https://github.com/drogonframework/drogon/blob/3fce70b535dcee9efb2f5f805d8a81d04a5adeb3/lib/src/ListenerManager.cc#L78-L193