code: private void restartPreviousConnection() throws CommunicationException, KeystoreException {
  		try {
  			logger.debug("Closing connection to restart previous one");
  			this.socket.close();
  		} catch (Exception e) {
  			/* Do not complain if connection is already closed... */
  		}
  		initializePreviousConnection();
  	}
docs: Stop and restart the current connection to the Apple server using server settings from the previous connection.
  @throws CommunicationException thrown if a communication error occurs
  @throws KeystoreException thrown if there is a problem with your keystore