#712 mod_pinger breaks hibernated smacks sessions

Reporter ge0rg
Owner Nobody
Created
Updated
Stars ★ (1)  
Tags
  • Status-New
  • Priority-Medium
  • Type-Defect
  1. ge0rg on

    mod_pinger periodically tries to ping every connected s2s and c2s connection. It does so even onhibernated smacks sessions, causing the timeout to happen and the session to be destroyed (tested on 0.9 and 0.10): Jul 27 15:03:49 yax.im:pinger info Client "georg@yax.im/resource" silent for too long, closing... Jul 27 15:03:49 c2s554e970 debug Destroying session for georg@yax.im/resource (georg@yax.im): connection-timeout The ideal solution I am looking for should do the following: 1. only ping a connection after no data was received from the other side for a configurable idle timeout (instead of pinging all clients and servers at the same time, irregardless of data received) 2. automatically use <r> instead of <iq ping> on 0198-enabled connections 3. if no <a> or <iq response> was received after another configurable ping timeout, close or hibernate the session All the current solutions have shortcomings regarding at least one of these requirements: - mod_pinger does not honor incoming stanzas, causing more pings than actually needed, and it breaks hibernated sessions - mod_smacks has a handle_read_timeout (that fulfills requirement 1), but it has no support for non-0198 sessions (which is inacceptable) and uses the same timeout value for both 1 and 3 (which I could live with) I'd be fine with this becoming part of smacks or pinger or a separate module, as long as it is properly communicated. Thank you.

  2. ge0rg on

    P.S: mod_pinger is using a hardcoded "urn:xmpp:sm:2" namespace, which will probably break clients. Instead it should use whatever namespace the client has negotiated.

  3. ge0rg on

    P.S: mod_pinger is using a hardcoded "urn:xmpp:sm:2" namespace, which will probably break clients. Instead it should use whatever namespace the client has negotiated.

New comment