public String[] getCMD() {
		if (!connected)
			return null;

		if (stability == NO_CONNECTION) {
			return buildCMD(CMD.CONNECTION_LOST);
		}

		try {
			String[] cmd = inFromClient.readLine().trim().split(SPLITTER);
			if (stability != STABLE) {
				stability++;
				log("stability: " + stability);
			}
			if (cmd[0].equals(CMD.PING)) {
				pingReceived = true;
				return null;
			}
			return cmd;
		} catch (IOException | NullPointerException e) {
			return null;
		}
	}