Comparison

mod_s2s_keepalive/mod_s2s_keepalive.lua @ 3766:f547eafb5a6d

mod_s2s_keepalive: Fix s2sout watchdog reset
author Kim Alvefur <zash@zash.se>
date Sat, 21 Dec 2019 18:38:22 +0100
parent 3765:11878130f266
child 3769:ce1a32aa8bca
comparison
equal deleted inserted replaced
3765:11878130f266 3766:f547eafb5a6d
60 module:hook("iq-result/host/keepalive", function (event) 60 module:hook("iq-result/host/keepalive", function (event)
61 local origin = event.origin; 61 local origin = event.origin;
62 if origin.watchdog_keepalive then 62 if origin.watchdog_keepalive then
63 origin.watchdog_keepalive:reset(); 63 origin.watchdog_keepalive:reset();
64 end 64 end
65 if s2sout[origin.from_host] then 65 if s2sout[origin.from_host] and s2sout[origin.from_host].watchdog_keepalive then
66 s2sout[origin.from_host]:reset(); 66 s2sout[origin.from_host].watchdog_keepalive:reset();
67 end 67 end
68 end); 68 end);
69 69
70 module:hook("iq-error/host/keepalive", function (event) 70 module:hook("iq-error/host/keepalive", function (event)
71 local origin = event.origin; 71 local origin = event.origin;