/** * {@inheritDoc} */ @Override public void reconnect() throws ConnectException { if ((null != client) && !isConnected()) { try { reconnectClient(); log.info("KryoNet: Reconnection successful!"); connectionException = false; synchronized (reconnectionMonitor) { reconnectionMonitor.notifyAll(); } } catch (Exception exception) { connectionException = true; ConnectException e = new ConnectException(exception.getMessage()); e.initCause(exception); throw e; // NOPMD root cause exception is set } } }