Fix idle timeout warning on registration / login (#2322)

Fix #2319
This should resolve the issue of users getting the popup immediately when logging in and the time out value is set to 0.
This needs tested, its a quick fix put in with the web editor.
This commit is contained in:
woogerboy21 2016-12-20 16:15:16 -08:00 committed by GitHub
parent 3d0600b516
commit 36e6da2abd

View file

@ -394,7 +394,7 @@ void Server_ProtocolHandler::pingClockTimeout()
}
}
if (((timeRunning - lastActionReceived) >= ceil(server->getIdleClientTimeout() *.9)) && (!idleClientWarningSent)) {
if (((timeRunning - lastActionReceived) >= ceil(server->getIdleClientTimeout() *.9)) && (!idleClientWarningSent) && (server->getIdleClientTimeout() > 0)) {
Event_NotifyUser event;
event.set_type(Event_NotifyUser::IDLEWARNING);
SessionEvent *se = prepareSessionEvent(event);