Merge "Don't reject "ctl.stop.*" during shutdown." into main

This commit is contained in:
Elliott Hughes 2024-04-30 22:56:32 +00:00 committed by Gerrit Code Review
commit 2026332ed8

View file

@ -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;
}