From 69d82e63b741ab5cfb3ae5997df75082f6ccd924 Mon Sep 17 00:00:00 2001 From: lvchenyun <131850965+lvchenyun@users.noreply.github.com> Date: Mon, 19 Feb 2024 16:36:07 +0800 Subject: [PATCH] Fixed the issue of crashes caused by the destruction of the EventPoller during process exit (#211) --- src/Poller/EventPoller.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Poller/EventPoller.cpp b/src/Poller/EventPoller.cpp index b4b1e7ca..8e1e9941 100644 --- a/src/Poller/EventPoller.cpp +++ b/src/Poller/EventPoller.cpp @@ -79,7 +79,7 @@ void EventPoller::shutdown() { if (_loop_thread) { //防止作为子进程时崩溃 - try { _loop_thread->join(); } catch (...) {} + try { _loop_thread->join(); } catch (...) { _loop_thread->detach(); } delete _loop_thread; _loop_thread = nullptr; }