Hi all,
I make an application with 3.2.1 Smack library using jabber.org accounts and i have always (or almost the time) the same problem with reconnection.
No response from the server.:
at org.jivesoftware.smack.SASLAuthentication.bindResourceAndEstablishSession(SASLA uthentication.java:452)
at org.jivesoftware.smack.SASLAuthentication.authenticate(SASLAuthentication.java: 348)
at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:203)
at org.jivesoftware.smack.XMPPConnection.connect(XMPPConnection.java:964)
at org.jivesoftware.smack.ReconnectionManager$2.run(ReconnectionManager.java:128)
This error occurr with a simplistic test like unplug and plug the network cable.
I read a lot about it and i check the source file of SASLAuthentication and i can’t found the solution for this problem.
I try to resolve it with some solutions like using google accounts or add more time to the reply time
SmackConfiguration.setPacketReplyTimeout(30000);
because in the SASLAuthentication source file we have this lines
private String bindResourceAndEstablishSession(String resource) throws XMPPException {
…
// Wait up to a certain number of seconds for a response from the server.
Bind response = (Bind) collector.nextResult(SmackConfiguration.getPacketReplyTimeout());
collector.cancel();
if (response == null) {
throw new XMPPException("No response from the server.");
}
…
but without success.
This is a big problem of Smack that make me think to change the XMPP library.
Please help me.
Regards,
Paulo Marques
PS: one more thing, i want to make a reconnection mecanism like google talk, when a error occurrs we have a “try now” that stop the time to make to reconnect, and if it fail, the time grow up. Anybody know to do that? it’s possible get the ReconnectionManager instance of the connection?