Don't call isConnected() from main thread.