1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-02 14:55:58 +01:00
Smack/smack-tcp/src
Florian Schmaus 96bb37f924 Fix counting bug Stream Management implementation
Previously Smack would put messages in the unacknowledgedStanzas queue
after it received the 'enabled' element, when it should do so right
after sending the 'enable' stream element.

Imagine a session where '-->' denotes "received from server" and '<--'
"sent to server"

<-- enable
--> iq roster push set
--> presence some presence
<-- iq roster push result
--> enabled

then Smack would not add the iq roster push result stanza to the
unacknowledgedStanzas queue.

This fixes the issue by initializing the unacknowledgedStanzas queue
when the writer thread encounters a 'Enable' stream element.

The additional 'instanceof' invocation in the writer thread should not
be a big performance issue, since the existing "instanceof Stanza" check
should be the common case and the "instanceof Enable" is an exclusive
alternative to this case.
2015-03-02 16:17:47 +01:00
..
main Fix counting bug Stream Management implementation 2015-03-02 16:17:47 +01:00
test/java/org/jivesoftware/smack Create smack-im subproject for XMPP-IM 2015-01-26 07:54:05 +01:00