src/main/java/org/jivesoftware/smack/PacketReader.java
public void shutdown() {
        // Notify connection listeners of the connection closing if done hasn't
        // already been set.
        if (!done) {
            for (ConnectionListener listener : connection
                    .getConnectionListeners()) {
                try {
                    listener.connectionClosed();
                } catch (Exception e) {
                    // Catch and print any exception so we can recover
                    // from a faulty listener and finish the shutdown process
                    LOGGER.log(Level.ERROR,
                            "Error in listener while closing connection", e);
                }
            }
        }
        done = true;

        // Shut down the listener executor.
        listenerExecutor.shutdown();
    }
public void shutdown() {
        // Notify connection listeners of the connection closing if done hasn't
        // already been set.
        if (!done) {
            for (ConnectionListener listener : connection
                    .getConnectionListeners()) {
                try {
                    listener.connectionClosed();
                } catch (Exception e) {
                    // Catch and print any exception so we can recover
                    // from a faulty listener and finish the shutdown process
                    LOGGER.log(Level.ERROR,
                            "Error in listener while closing connection", e);
                }
            }
        }
        done = true;

        // Shut down the listener executor.
        listenerExecutor.shutdown();
    }
Shuts the packet reader down.