From 847eee2086f9eb29846191851e75b0a8c0ccb610 Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Tue, 15 Jun 2021 12:57:13 -0700 Subject: [PATCH] [srp-client] allow callback to be invoked when client is stopped (#6723) This commit relaxes the condition for invoking the callback from SRP client allowing it to be invoked when client is stopped. Note that the user can call SRP client APIs to add or remove services while it is stopped. A remove request may be processed immediately (if the service has not yet been registered) and then the callback is invoked to notify the caller to reclaim the service entry. --- src/core/net/srp_client.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/core/net/srp_client.cpp b/src/core/net/srp_client.cpp index 35aaa1600..4ceb8f1e5 100644 --- a/src/core/net/srp_client.cpp +++ b/src/core/net/srp_client.cpp @@ -594,7 +594,6 @@ void Client::InvokeCallback(Error aError) const void Client::InvokeCallback(Error aError, const HostInfo &aHostInfo, const Service *aRemovedServices) const { - VerifyOrExit(GetState() != kStateStopped); VerifyOrExit(mCallback != nullptr); mCallback(aError, &aHostInfo, mServices.GetHead(), aRemovedServices, mCallbackContext);