AnsweredAssumed Answered

Proper Disconnect Handling

Question asked by Adam D on May 1, 2017

Hello -


I am running 4.1 Smack, and there does not seem to be a lot of documentation around proper error handling, especially around MUC re-joining.  I have implemented all the listeners that i feel are necessary but when a disconnect happens ( connection error), the Connection listener is fired, i end up re-connecting properly, but when trying to re-join the rooms, i get the common "Packet reply timeout error".  I tried leaving and then joining, but no luck.  My guess is something is getting stuck with the connection state.


org.jivesoftware.smack.SmackException$NoResponseException: No response received within reply timeout. Timeout was 60000ms (~60s). Used filter: AndFilter: (FromMatchesFilter (full):, StanzaTypeFilter: Presence).

        at org.jivesoftware.smack.SmackException$NoResponseException.newWith(SmackExceptio

        at org.jivesoftware.smack.SmackException$NoResponseException.newWith(SmackExceptio

        at org.jivesoftware.smack.PacketCollector.nextResultOrThrow( 29)

        at org.jivesoftware.smackx.muc.MultiUserChat.enter(

        at org.jivesoftware.smackx.muc.MultiUserChat.join(



Are there any good reference implementations of handling these issues in smack ?


My sample (scala) code is here for the HipChat class i created


hipchat.scala · GitHub