fix access to uninitialized var in checkClientPauseTimeoutAndReturnIfPaused (#8765)

server.client_pause_end_time is uninitialized, or actually 0, at startup,
which means this method would think the timeout was reached
and go look for paused clients.

This causes no harm since unpauseClients will not find any paused clients.
This commit is contained in:
Oran Agra 2021-04-13 08:41:12 +03:00 committed by GitHub
parent e57e8779d8
commit 8133b72268

View File

@ -3332,6 +3332,8 @@ int areClientsPaused(void) {
* if it has. Also returns true if clients are now paused and false
* otherwise. */
int checkClientPauseTimeoutAndReturnIfPaused(void) {
if (!areClientsPaused())
return 0;
if (server.client_pause_end_time < server.mstime) {
unpauseClients();
}