public boolean getConnected() {
        ConnectedLock.lock();
        try {
            if (!ConnectedDecided) {
                ConnectedCond.await();
            }
        } catch (InterruptedException ex) {
            ex.printStackTrace();
        } finally {
            ConnectedLock.unlock();
        }
        return Connected;
    }