/** * Performs an unclean disconnect and shutdown of the connection. Does not send a closing stream stanza. */ public synchronized void instantShutdown() { shutdown(true); }
/** * Shuts the current connection down. After this method returns, the connection must be ready * for re-use by connect. */ @Override protected void shutdown() { if (isSmEnabled()) { try { // Try to send a last SM Acknowledgement. Most servers won't find this information helpful, as the SM // state is dropped after a clean disconnect anyways. OTOH it doesn't hurt much either. sendSmAcknowledgementInternal(); } catch (InterruptedException | NotConnectedException e) { LOGGER.log(Level.FINE, "Can not send final SM ack as connection is not connected", e); } } shutdown(false); }