[data-poll] only allow data polling when rx-off-when-idle (#2770)

This commit is contained in:
Jonathan Hui
2018-06-08 10:13:52 -07:00
committed by GitHub
parent e1fa68f650
commit 631557e81f
+1 -1
View File
@@ -71,7 +71,7 @@ otError DataPollManager::StartPolling(void)
otError error = OT_ERROR_NONE;
VerifyOrExit(!mEnabled, error = OT_ERROR_ALREADY);
VerifyOrExit(!GetNetif().GetMle().IsFullThreadDevice(), error = OT_ERROR_INVALID_STATE);
VerifyOrExit(!GetNetif().GetMle().IsRxOnWhenIdle(), error = OT_ERROR_INVALID_STATE);
mEnabled = true;
ScheduleNextPoll(kRecalculatePollPeriod);