@Override
    public void onClosed(Connection connection) {
        handleListenerInvocation("Connection.Listener", "onClosed", "%h", List.of(connection), () -> {
            SocketChannelEndPoint endpoint = findUnderlyingSocketEndpoint(connection.getEndPoint());
            ConnectionInfo info = connectionInfos.get(endpoint).orElse(null);
            if (info == null) return; // Closed connection already handled
            if (connection instanceof HttpConnection) {
                info.setHttpBytes(connection.getBytesIn(), connection.getBytesOut());
            }
            if (connection.getEndPoint() instanceof SslConnection.SslEndPoint ssl) {
                info.setSslBytes(ssl.getSslConnection().getBytesIn(), ssl.getSslConnection().getBytesOut());
            }
            if (!endpoint.isOpen()) {
                info.setClosedAt(System.currentTimeMillis());
                connectionLog.log(info.toLogEntry());
                connectionInfos.remove(endpoint);
                sslEngines.remove(endpoint)
                        .ifPresent(sslToConnectionInfo::remove);
            }
        });
    }
Jetty integration for jdisc connection log ({@link ConnectionLog}).

@author bjorncs
container-core/src/main/java/com/yahoo/jdisc/http/server/jetty/JettyConnectionLogger.java