Update cached time only in main cron

Former-commit-id: 5396dd9587599d6672e8d80967aa1fd8ba16e7ec
This commit is contained in:
John Sully 2020-05-11 20:31:47 -04:00
parent daaf82b673
commit ceb8f19078

View File

@ -2249,8 +2249,6 @@ int serverCronLite(struct aeEventLoop *eventLoop, long long id, void *clientData
int iel = ielFromEventLoop(eventLoop); int iel = ielFromEventLoop(eventLoop);
serverAssert(iel != IDX_EVENT_LOOP_MAIN); serverAssert(iel != IDX_EVENT_LOOP_MAIN);
updateCachedTime(1);
/* If another threads unblocked one of our clients, and this thread has been idle /* If another threads unblocked one of our clients, and this thread has been idle
then beforeSleep won't have a chance to process the unblocking. So we also then beforeSleep won't have a chance to process the unblocking. So we also
process them here in the cron job to ensure they don't starve. process them here in the cron job to ensure they don't starve.