final XnioExecutor.Key key = exchange.getIoThread().executeAfter(new Runnable() {
@Override
public void run() {
UndertowLogger.REQUEST_LOGGER.proxyRequestTimedOut(exchange.getRequestURI());
IoUtils.safeClose(exchange.getConnection());
ClientConnection clientConnection = exchange.getAttachment(CONNECTION);
IoUtils.safeClose(clientConnection);
}
}, maxRequestTime, TimeUnit.MILLISECONDS);
exchange.putAttachment(TIMEOUT_KEY, key);
exchange.addExchangeCompleteListener(new ExchangeCompletionListener() {