Skip to content

Commit 57c6600

Browse files
committed
Abandon timer coroutine handles during shutdown to avoid stack overflow
Same pattern as the IOCP shutdown fix (a397ea4): replace h_.destroy() with h_ = {} to abandon the coroutine handle instead of destroying it. Destroying timer waiter coroutines during shutdown can trigger re-entrant destruction through circular frame ownership.
1 parent 3a29bea commit 57c6600

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/boost/corosio/detail/timer_service.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ timer_service::shutdown()
335335
while (auto* w = impl->waiters_.pop_front())
336336
{
337337
w->stop_cb_.reset();
338-
w->h_.destroy();
338+
w->h_ = {};
339339
sched_->work_finished();
340340
delete w;
341341
}

0 commit comments

Comments
 (0)