@Override
            public void onError(AsyncEvent asyncEvent) {
                Log.trace("Session {} Request ID {}, event error: {}", streamID, rid, asyncEvent);
                Log.warn("For session {} an unhandled AsyncListener error occurred: ", streamID, asyncEvent.getThrowable());
                synchronized (connectionQueue) {
                    // There was an error with a connection. Make sure it cannot be consumed again.
                    connectionQueue.remove(connection);
                }
                SessionEventDispatcher.dispatchEvent( HttpSession.this, SessionEventDispatcher.EventType.connection_closed, connection, context );
            }
Creates a new connection on this session.

@param body the body element that was sent containing the request for a new session.
@param context the context of the asynchronous servlet call leading up to this method call.
@return the created {@link HttpConnection} which represents the connection.
xmppserver/src/main/java/org/jivesoftware/openfire/http/HttpSession.java