patch e8534a5cb083b3d82aff297783e2c5d2d683c8d3
Author: Enrique D. Bosch <presidev@AT@gmail.com>
Date: Mon Sep 17 16:50:09 CEST 2018
* Reset client keepalive when server keepalive (untagged "OK still here" like response) is detected
diff -rN -u old-idlebiff/idlebiff new-idlebiff/idlebiff
--- old-idlebiff/idlebiff 2024-11-22 16:19:09.789012431 +0100
+++ new-idlebiff/idlebiff 2024-11-22 16:19:09.789012431 +0100
@@ -512,11 +512,24 @@
proc parse_idle_check con \
{
variable ::shared::idle
+ variable ::shared::ka
+ variable ::shared::conf
if {[ catch { set linea [ read_line $con ] } ]} return
set prim [ string range $linea 0 0 ]
if {[ eq $prim + ]} { set idle 1 } \
- elseif { $idle } { if {[ eq $prim * ]} { idle_cycle $con 1 } } \
+ elseif { $idle } \
+ {
+ if {[ eq $prim * ]} \
+ {
+ if {[ ok_untagged $linea ]} \
+ {
+ after cancel $ka
+ set ka [ after ${conf(keepalive)}000 { idle_cycle $con 0 } ]
+ } \
+ else { idle_cycle $con 1 } \
+ } \
+ } \
else { parse_search $con $linea }
}