}
private void sendBadRequestAndClose(final StreamConnection channel, final Exception exception) {
UndertowLogger.REQUEST_IO_LOGGER.failedToParseRequest(exception);
channel.getSourceChannel().suspendReads();
new StringWriteChannelListener(BAD_REQUEST) {
@Override
protected void writeDone(final StreamSinkChannel c) {
IoUtils.safeClose(channel);
}
}.setup(channel.getSinkChannel());