File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -389,7 +389,7 @@ class posix_resolver_impl
389389
390390 void release () override ;
391391
392- std::coroutine_handle<> resolve (
392+ void resolve (
393393 std::coroutine_handle<>,
394394 capy::executor_ref,
395395 std::string_view host,
@@ -399,7 +399,7 @@ class posix_resolver_impl
399399 std::error_code*,
400400 resolver_results*) override ;
401401
402- std::coroutine_handle<> reverse_resolve (
402+ void reverse_resolve (
403403 std::coroutine_handle<>,
404404 capy::executor_ref,
405405 endpoint const & ep,
Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ class posix_signal_impl
189189
190190 void release () override ;
191191
192- std::coroutine_handle<> wait (
192+ void wait (
193193 std::coroutine_handle<>,
194194 capy::executor_ref,
195195 std::stop_token,
Original file line number Diff line number Diff line change @@ -107,8 +107,20 @@ class timer_service_impl : public timer_service
107107
108108 void shutdown () override
109109 {
110+ // Cancel all waiting timers and destroy coroutine handles
111+ // This properly decrements outstanding_work_ for each waiting timer
110112 while (auto * impl = timers_.pop_front ())
113+ {
114+ if (impl->waiting_ )
115+ {
116+ impl->waiting_ = false ;
117+ // Destroy the coroutine handle without resuming
118+ impl->h_ .destroy ();
119+ // Decrement work count to avoid leak
120+ sched_->on_work_finished ();
121+ }
111122 delete impl;
123+ }
112124 while (auto * impl = free_list_.pop_front ())
113125 delete impl;
114126 }
You can’t perform that action at this time.
0 commit comments