fix ping request and _rd close case
authorMatteo Nastasi <nastasi@alternativeoutput.it>
Tue, 31 Mar 2020 11:06:56 +0000 (13:06 +0200)
committerMatteo Nastasi <nastasi@alternativeoutput.it>
Tue, 31 Mar 2020 11:06:56 +0000 (13:06 +0200)
web/Obj/brisk.phh

index 9c20af1..aa3ed2c 100644 (file)
@@ -1373,7 +1373,7 @@ class Brisk
         if ($user_cur->is_active() == FALSE)
             continue;
 
-        if ($user_cur->lacc + EXPIRE_TIME_RD < ($curtime - $delta)) {
+        if ($user_cur->lacc + (($user_cur->ping_req ? 2 : 1) * EXPIRE_TIME_RD) < ($curtime - $delta)) {
             // Auto logout dell'utente
             log_rd2("AUTO LOGOUT.".($user_cur->lacc + EXPIRE_TIME_RD)." curtime - delta ".($curtime - $delta));