@Override
    public void close()
    {
        // Make the worker pool process this, to help ensure that the 'close' event is being processed in order (eg: not prior to the processing of other data, such as any pending processing of data).
        synchronized (router) {
            try {
                HttpBindManager.getInstance().getSessionManager().execute(this, () -> {
                    Log.trace("Stream {}: Closing", streamID);
                    super.close();
                });
            } catch (Throwable t) {
                Log.warn("Unable to close session", t);
            }
        }
    }
Schedules the connection for processing, ensuring that connections are processed in the order of their request ID
values. Processing causes data delivered by the client to be routed in the server to their intended recipients,
and allow the connection to be used to send back data to the client.

@param connection The connection ready to be processed.
@param context the context of the asynchronous servlet call leading up to this method call.
xmppserver/src/main/java/org/jivesoftware/openfire/http/HttpSession.java