Quantcast
Channel: Ignite Realtime : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 10742

Android XMPP using smack: First attempt always fail

$
0
0

We are  using asmack library (asmack-android-10-0.8.10) in our android app, we use it in order to connect to our XMPP server. Always in the first attempt we get an error:

xmppServicesBot [services.myvoco.net] xmppServer +[xmpp.myvoco.net] 
W/System.err(16560): service-unavailable(503)
W/System.err(16560):     at org.jivesoftware.smack.NonSASLAuthentication.authenticate(NonSASLAuthentication.java:77)
W/System.err(16560):     at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:251)
W/System.err(16560):     at com.navvo.android.grasshopper.xmpp.MyVoco.connect(MyVoco.java:586)
W/System.err(16560):     at com.navvo.android.grasshopper.xmpp.MyVoco.xmppThread(MyVoco.java:479)
W/System.err(16560):     at com.navvo.android.grasshopper.xmpp.MyVoco.access$000(MyVoco.java:47)
W/System.err(16560):     at com.navvo.android.grasshopper.xmpp.MyVoco$1.run(MyVoco.java:118) (16560): [xmppThread] Connect Failed, sleeping 1 second and trying again.

Then the app waits for a second in order to retry the connection,then on the second attempt the app is able to connect into the servers. I'm not sure why we get this condition? We think it is a race condition, because if we delay the first attempt in 5 seconds, we get the connection without any error.

I really appreciate some help

Thanks


Viewing all articles
Browse latest Browse all 10742

Trending Articles