init: do not handle control messages after shutdown
We already stop queue'ing new control messages, but we forgot to stop
handling those control messages that are already queued. This CL
fixes that.
Bug: 150863651
Test: CF reboots appropriately
Change-Id: Ifea07a30b868de23eb735db10d8bae410e1b98bb
diff --git a/init/init.cpp b/init/init.cpp
index 20b4176..7631964 100644
--- a/init/init.cpp
+++ b/init/init.cpp
@@ -901,7 +901,9 @@
(*function)();
}
}
- HandleControlMessages();
+ if (!IsShuttingDown()) {
+ HandleControlMessages();
+ }
}
return 0;