Quantcast
Channel: Ignite Realtime: Message List
Viewing all articles
Browse latest Browse all 12000

Re: Smack doesn't detect broken connection

$
0
0

isConnected() merely returns the internal state of Smack. There is no way Smack could reliable detect a broken connection in your scenario (if the OS doesn't propagate the broken TPC pipe up to the socket used by Smack, which is not always the case).

 

If you want to know if you are still connected to the server, use PingManager.pingMyServer(). If it returns 'true' you are still connected, if it returns 'false' you are either disconnected, or the server's pong didn't arrive within the default reply timeout.


Viewing all articles
Browse latest Browse all 12000

Trending Articles