mirror of
https://github.com/espressif/openthread.git
synced 2026-10-26 09:13:52 +00:00
[commissioner] fix duplicate commissioner start (#4899)
This commit fixes the bug that duplicate commissioner start will incorrectly close CoapSecure.
This commit is contained in:
@@ -173,7 +173,10 @@ exit:
|
||||
if (error != OT_ERROR_NONE)
|
||||
{
|
||||
otLogWarnMeshCoP("Failed to start commissioner: %s", otThreadErrorToString(error));
|
||||
Get<Coap::CoapSecure>().Stop();
|
||||
if (error != OT_ERROR_ALREADY)
|
||||
{
|
||||
Get<Coap::CoapSecure>().Stop();
|
||||
}
|
||||
}
|
||||
|
||||
return error;
|
||||
|
||||
Reference in New Issue
Block a user