-
Notifications
You must be signed in to change notification settings - Fork 429
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4407 from esl/fix-duplicated-mam-msg
Add delays to SM buffer This PR adds <delay> elements to stanzas rerouted through mod_stream_management. This element was already present when a user requested stream resumption, and had unacknowledged stanzas. Currently, when a user reconnects, has unacknowledged stanzas, and doesn't request stream resumption, the stream management rerouting behaviour is to try to resend the stanzas to them, because MIM doesn't know if they have reached the user. However, if the user is using a different resource, the stanzas would get rerouted only after resume_timeout passes, which could be surprising without the <delay> element. Even when rerouting to the same resource before the timeout, I think adding the <delay> could help client developers detect retransmitted stanzas. The <delay> elements sent by SM and mod_presence will now also include a description of where the delay is coming from (this is in allowed by https://xmpp.org/extensions/xep-0203.html). This may improve debugging in corner cases. I've also applied some fixes to the sm_SUITE and reworked the resend_unacked_after_resume_timeout so that the testcase reflects the title. With the new changes it is indeed checking the after_resume_timeout part. I've added a similar case which checks the behaviour for users reconnecting with a different resource.
- Loading branch information
Showing
4 changed files
with
91 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters