comparison mod_smacks/mod_smacks.lua @ 4446:3d593b612e07

mod_smacks: Request ack on signal of ongoing CSI flush Should make it finally behave with mod_csi_simple from Prosody trunk
author Kim Alvefur <zash@zash.se>
date Tue, 16 Feb 2021 23:16:05 +0100
parents e13eb0f851c8
children 5234d0c8883d
comparison
equal deleted inserted replaced
4445:e13eb0f851c8 4446:3d593b612e07
643 643
644 module:hook("csi-client-active", function (event) 644 module:hook("csi-client-active", function (event)
645 request_ack_if_needed(event.origin, true, "csi-active", nil); 645 request_ack_if_needed(event.origin, true, "csi-active", nil);
646 end); 646 end);
647 647
648 module:hook("csi-flushing", function (event)
649 request_ack_if_needed(event.session, true, "csi-active", nil);
650 end);
651
648 local function handle_read_timeout(event) 652 local function handle_read_timeout(event)
649 local session = event.session; 653 local session = event.session;
650 if session.smacks then 654 if session.smacks then
651 if session.awaiting_ack then 655 if session.awaiting_ack then
652 if session.awaiting_ack_timer then 656 if session.awaiting_ack_timer then