summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2024-04-30 22:56:32 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2024-04-30 22:56:32 +0000
commit2026332ed854631bf5bfbbcb49e9df98cc7fcc01 (patch)
tree8f601178178963adff0d9a7cc4d1e0354af54b2d
parentb6c33dc967a55fe023aee174a9f3d6cd3a340943 (diff)
parentc9d44b84fef800f5edb6225b1dd20420b38d4037 (diff)
downloadcore-master.tar.gz
Merge "Don't reject "ctl.stop.*" during shutdown." into mainHEADmastermain
-rw-r--r--init/property_service.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/init/property_service.cpp b/init/property_service.cpp
index 5a1b63b2e..d02ca1e49 100644
--- a/init/property_service.cpp
+++ b/init/property_service.cpp
@@ -453,6 +453,10 @@ static uint32_t SendControlMessage(const std::string& msg, const std::string& na
SocketConnection* socket, std::string* error) {
auto lock = std::lock_guard{accept_messages_lock};
if (!accept_messages) {
+ // If we're already shutting down and you're asking us to stop something,
+ // just say we did (https://issuetracker.google.com/336223505).
+ if (msg == "stop") return PROP_SUCCESS;
+
*error = "Received control message after shutdown, ignoring";
return PROP_ERROR_HANDLE_CONTROL_MESSAGE;
}