Hi,
We have a smack implementation and we want it to stay connected to server forever. After days of running, we saw that it is disconnected. Looking at the logs, connection listeners connectionClosed() (not connectionClosedOnError) method is called. I looked at the source code and just found those lines:
else if (eventType == XmlPullParser.END_TAG) {
if (parser.getName().equals(“stream”)) {
// Disconnect the connection
connection.disconnect();
}
}
It looks like the server wants to end the connection if I understood correctly.
-
Why the server wants to end the connection? Is there a reason that is sent when closing the stream tag? (gtalk server)
-
So, I did not close the connection. Am I expected to implement reconnection logic in my connectionlistener’s connectionClosed method? I understand reconnection as “stay connected while server is available no matter what happens”.
Thanks for your help again.