Comparison

mod_smacks/mod_smacks.lua @ 2251:48c3d64a3fc1

mod_smacks: Signal that we're about to send an ack request from read timeout event to prevent a duplicate request from outgoing stanza filter
author Kim Alvefur <zash@zash.se>
date Tue, 26 Jul 2016 12:37:04 +0200
parent 2148:c472a454be61
child 2394:4c27ebcf4cbd
comparison
equal deleted inserted replaced
2250:f5cc6328b20f 2251:48c3d64a3fc1
406 session.awaiting_ack_timer:stop(); 406 session.awaiting_ack_timer:stop();
407 end 407 end
408 return false; -- Kick the session 408 return false; -- Kick the session
409 end 409 end
410 session.log("debug", "Sending <r> (read timeout)"); 410 session.log("debug", "Sending <r> (read timeout)");
411 session.awaiting_ack = false;
411 (session.sends2s or session.send)(st.stanza("r", { xmlns = session.smacks })); 412 (session.sends2s or session.send)(st.stanza("r", { xmlns = session.smacks }));
412 session.awaiting_ack = true; 413 session.awaiting_ack = true;
413 return true; 414 return true;
414 end 415 end
415 end 416 end