XMPP Reconnect
Xmpp gets disconnected when internet connection is lost. Is there any way to reconnect to xmpp automatically after the internet connection is established even if the app is in the background?
I would like to know the same I'm guessing ud have to monitor network status every so many minutes
Am also facing the same issue. The app wont reconnect if the app is in background. However as soon as the app comes to the foreground, it gets reconnected. (Am using the XMPP Reconnect Module).
If the internet connection is persistent, the works in background for hours without any issue.
Does anyone have a solution?
Any Solution ??
I am using Reachability for reconnect
@x3mall1986 i am using Reachability , Once Internet is connect i am trying to reconnect with below code
rebindAuthentication = XMPPRebindAuthentication(stream: sender, sessionID: xmppProcess?.savedSessionID!, sessionJID: xmppProcess?.savedSessionJID)
@ravikanthatstoryboard I am using
[self.xmppStream connectWithTimeout:XMPPStreamTimeoutNone error:&error]
for connect and reconect
thank a lot .. @x3mall1986 reconnecting working now .....
@x3mall1986 xmppStream is frequently disconnecting ?
By using this i am recconnecting again [self.xmppStream connectWithTimeout:XMPPStreamTimeoutNone error:&error]
is there any solution for that ?
@ravikanthatstoryboard xmppStream is disconnected only when the connection to the Internet is lost. Read the error from delegates:
- (void)xmppStream:(XMPPStream *)sender didReceiveError:(id)error
- (void)xmppStreamDidDisconnect:(XMPPStream *)sender withError:(NSError *)error