From 8048839206f443adda5485c0dca24b3c9eca9098 Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Fri, 3 Dec 2021 14:53:05 -0800 Subject: [PATCH] [srp-client] skip appending services on host remove retry (#7218) This commit updates `Srp::Client` to skip appending services when the host is being removed. On the first attempt the `mHostInfo.GetState()` will be `kToRemove` but on the retries it will be `kRemoving`. --- src/core/net/srp_client.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/net/srp_client.cpp b/src/core/net/srp_client.cpp index de18930ec..d8d196098 100644 --- a/src/core/net/srp_client.cpp +++ b/src/core/net/srp_client.cpp @@ -767,7 +767,7 @@ Error Client::PrepareUpdateMessage(Message &aMessage) // Prepare Update section - if (mHostInfo.GetState() != kToRemove) + if ((mHostInfo.GetState() != kToRemove) && (mHostInfo.GetState() != kRemoving)) { for (Service &service : mServices) {