DataPollManager: Fix the reseting of the mNoBufferRetxMode. (#1615)

This commit is contained in:
Abtin Keshavarzian
2017-04-19 08:38:56 -07:00
committed by Jonathan Hui
parent fc931e9ecf
commit bd6b55376a
+12 -5
View File
@@ -125,7 +125,17 @@ exit:
{
case kThreadError_None:
otLogDebgMac(GetInstance(), "Sent poll");
ScheduleNextPoll(kUsePreviousPollPeriod);
if (mNoBufferRetxMode == true)
{
mNoBufferRetxMode = false;
ScheduleNextPoll(kRecalculatePollPeriod);
}
else
{
ScheduleNextPoll(kUsePreviousPollPeriod);
}
break;
case kThreadError_InvalidState:
@@ -335,10 +345,7 @@ uint32_t DataPollManager::CalculatePollPeriod(void) const
if (mAttachMode == true)
{
if ((period == 0) || (period > kAttachDataPollPeriod))
{
period = kAttachDataPollPeriod;
}
period = kAttachDataPollPeriod;
}
if (mRetxMode == true)