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.
Do not call synchronized methods in reader/writer thread
This may cause deadlocks with a call to acquire(2) on the introduced
readerWriterSemaphore in initConnection(), which is also synchronized.
Florian Schmaus <flo@geekplace.eu>
c4289b2c1819bd7b62dca9ed7743410b19665296
Add AbstractXMPPConnection.initState()
and init/reset the sychronization points there.
This method is called right at the beginning of connect() and at the
end of shutdown().