[mle] fix reattach attempts after reset (#1995)

This commit is contained in:
rongli
2017-07-13 21:37:21 -07:00
committed by Jonathan Hui
parent 12040b7275
commit e350d4e49f
+5 -1
View File
@@ -481,7 +481,11 @@ otError Mle::BecomeDetached(void)
VerifyOrExit(mRole != OT_DEVICE_ROLE_DISABLED, error = OT_ERROR_INVALID_STATE);
netif.GetPendingDataset().HandleDetach();
// not in reattach stage after reset
if (mReattachState == kReattachStop)
{
netif.GetPendingDataset().HandleDetach();
}
SetStateDetached();
SetRloc16(Mac::kShortAddrInvalid);