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 TCP 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.