#601 s2s connections are closed before muc participants are kicked

Reporter Zash
Owner Zash
Created
Updated
Stars ★ (1)
Tags
  • Milestone-0.9
  • Priority-Medium
  • Type-Defect
  • Difficulty-VeryEasy
  • Status-Fixed
  1. Zash on

    When Prosody is shutting down and has s2s and MUC enabled, this happens: 1. The "server-stopping" event is fired 2. mod_s2s, having hooked this at priority 500, is invoked and closes all s2s connections 3. mod_muc, hooked at the default (0) priority, kicks all participants from all rooms Participants on remote rooms do not get notified and will believe they are still in the room until they manually re-join.

  2. Zash on

    This should be a simple enough fix to sneak into 0.9.10, just readjusting the priorities.

    Changes
    • owner Zash
    • tags Difficulty-VeryEasy Milestone-0.9
  3. sokai on

    Hi! Thanks for the ticket, fixing and the fix (provided by xnyhps at help-MUC): <pre> --- /usr/lib/prosody/modules/mod_s2s/mod_s2s.lua.dist 2016-01-08 15:08:35.000000000 +0100 +++ /usr/lib/prosody/modules/mod_s2s/mod_s2s.lua 2016-01-25 14:59:50.849474990 +0100 @@ -671,7 +671,7 @@ for _, session in pairs(sessions) do session:close{ condition = "system-shutdown", text = reason }; end -end,500); +end,-500); </pre>

  4. Zash on

    Fixed in http://hg.prosody.im/0.9/rev/301d58705667 This should ensure everyone is notified that they have now left the room, as long as there is a s2s connection. This does not fix cases where there is no s2s connection, such as if it timed out like some (read: ejabberd) does. Needs a bit of testing and this might not be a complete fix for this. FWIW, it is our intention that most internal events be at negative priority so that plugins do not have to specify a higher priority to behave as intended.

    Changes
    • tags Status-Started
  5. Zash on

    Fixed in http://hg.prosody.im/0.9/rev/301d58705667 and released in 0.9.10

    Changes
    • tags Status-Fixed

New comment

Not published. Used for spam prevention and optional update notifications.