mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2025-12-22 23:26:14 -08:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user