From: Davin McCall Date: Sat, 25 May 2019 14:56:12 +0000 (+1000) Subject: Fix restart after unexpected termination. X-Git-Tag: v0.6.0~46 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f1713b253dfcdb773d91d0138e297fb65217327d;p=oweals%2Fdinit.git Fix restart after unexpected termination. --- diff --git a/src/service.cc b/src/service.cc index 40ab90b..504a9b6 100644 --- a/src/service.cc +++ b/src/service.cc @@ -458,7 +458,7 @@ void service_record::forced_stop() noexcept force_stop = true; if (! pinned_started) { prop_stop = true; - services->add_transition_queue(this); + services->add_prop_queue(this); } } } diff --git a/src/tests/test-includes/dinit.h b/src/tests/test-includes/dinit.h index d97493d..3b99881 100644 --- a/src/tests/test-includes/dinit.h +++ b/src/tests/test-includes/dinit.h @@ -31,7 +31,8 @@ class eventloop_t void advance_time(time_val amount) { current_time += amount; - for (timer * t : active_timers) { + auto active_copy = active_timers; + for (timer * t : active_copy) { if (t->expiry_time >= current_time) { t->stop_timer(*this); rearm r = t->expired(*this, 1);