and found an issue with XMPPTCPConnection.isSmResumptionPossible method,
it returns always true in a case of reconnection
I noticed that shutdownTimestamp is always null inside isSmResumptionPossible method after reconnection and as a result
you do Stream Resumption inside **loginNonAnonymously **method
In a case of reconnection and stream resumption enabled I guess you don’t need to reset it in the method PacketWriter.init
What do you mean by reconnection? Calling disconnect() and connect()? Or instantShutdown() and connect()?
I mean to switch off and then on the internet connection on Android phone
always null? Shouldn’t it be set by PacketWriter.shutdown()?
I would say it should not in a case of Stream Resumption enabled
Switch OFF the Internet connection on Android phone
Wait 2 mins and switch ON the Internet connection on Android phone
The method XMPPTCPConnection.isSmResumptionPossible returned True, so user is trying to resume previous stream, but it fails on the backend because 2 minutes it’s too late. Default max value of stream resumption is 60 seconds.
The question is why it returned true after 2 mins of disconnection?
The default value of stream resumption time is 60 seconds.
The question is why it returned true after 2 mins of disconnection?
Hard to tell with the information available. AnXMPP trace of the session may be helpful.
I still fail to follow the issue. But since it appears you have a fix in mind, it may helps if you show it to us, then we can talk about it and maybe figure it out.