1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-17 04:32:04 +01:00
Smack/smack-tcp/src
Georg Lukas e5bbd19ef1 StanzaDroppedListener for XEP-0198 resumption failures
If a stream resume fails, smack will re-send all queued stanzas after a
reconnect. However, it does not make sense to re-send them:

* IQs / IQ responses have probably timed out
* MUC messages and PMs will be rejected as you haven't rejoined yet
* regular messages should be amended with a <delay> element

This patch adds a StanzaDroppedListener interface to the
XMPPTCPConnection. If at least one StanzaDroppedListener is provided,
all queued messages will be drained into the StanzaDroppedListener(s).
Otherwise, the original behavior of attempting to transmit them will be
followed.

Discussion: https://discourse.igniterealtime.org/t/xep-0198-resume-failure-reconnect-resending-of-muc-messages/83510/3

Signed-off-by: Georg Lukas <georg@op-co.de>
2019-03-10 21:24:37 +01:00
..
main StanzaDroppedListener for XEP-0198 resumption failures 2019-03-10 21:24:37 +01:00
test/java/org/jivesoftware/smack Make writer/reader fields final in XMPPTCPConnection 2019-02-09 18:12:36 +01:00