diff --git a/src/platform/Linux/DnssdImpl.cpp b/src/platform/Linux/DnssdImpl.cpp index f98c83adb118be..0ae581cc09b976 100644 --- a/src/platform/Linux/DnssdImpl.cpp +++ b/src/platform/Linux/DnssdImpl.cpp @@ -328,6 +328,11 @@ CHIP_ERROR MdnsAvahi::Init(DnssdAsyncReturnCallback initCallback, DnssdAsyncRetu CHIP_ERROR error = CHIP_NO_ERROR; int avahiError = 0; + if (Shutdown() != CHIP_NO_ERROR) + { + ChipLogError(DeviceLayer, "Shutdown() failed, continue anyway..."); + } + VerifyOrExit(initCallback != nullptr, error = CHIP_ERROR_INVALID_ARGUMENT); VerifyOrExit(errorCallback != nullptr, error = CHIP_ERROR_INVALID_ARGUMENT); VerifyOrExit(mClient == nullptr && mGroup == nullptr, error = CHIP_ERROR_INCORRECT_STATE);