Reputation: 3089
i have struggling problem of timeout in xmpp.
whenever i completed register my client on server after that exactly 1 min(60 sec) automatically call the delegate method of xmmppstream
- (void)xmppStreamDidDisconnect:(XMPPStream *)sender withError:(NSError *)error
it given me the error message like:
Error Domain=GCDAsyncSocketErrorDomain Code=7 "Socket closed by remote peer" UserInfo=0xc552bf0 {NSLocalizedDescription=Socket closed by remote peer}
Any idea on how to resolve this issue will be very helpful. Let me know if you need any additional info.
Thanks for your time and help.
Upvotes: 0
Views: 990
Reputation: 5266
Your server might be configured to ping clients every 60 secs and close sessions which are not respond to XMPP pings. You can activate XMPPPing
module and set pingModule.respondsToQueries = YES;
to handle such pings automatically.
Upvotes: 1