If event listening loop already finished the idle flag will changed to READY
We need to keep READY status for other event listening.
Change-Id: Ida65b41cfadce3caf8b3d2253a57f93eeb60e99e
// instead of waiting specific time
if (((std::chrono::system_clock::now() - mStartTime) >
std::chrono::milliseconds{WAIT_FOR_IDLE_MILLI_SEC}) ||
- (mRenderCount == 0))
+ (mRenderCount == 0) ||
+ (isIdle == IdleEventState::IDLE_LISTEN_READY))
{
break;
}
}
mTimerThread = nullptr;
- isIdle = IdleEventState::IDLE_LISTEN_DONE;
+ if (isIdle != IdleEventState::IDLE_LISTEN_READY)
+ isIdle = IdleEventState::IDLE_LISTEN_DONE;
g_thread_exit(NULL);
return NULL;