if (existing != null) {
UndertowLogger.REQUEST_LOGGER.debug("Resuming existing session, not doing NPN negotiation");
if (existing.equals(HTTP2)) {
Http2Channel sc = new Http2Channel(channel, bufferPool, new ImmediatePooled<>(ByteBuffer.wrap(new byte[0])), false, false, undertowOptions);
sc.getReceiveSetter().set(new Http2ReceiveListener(rootHandler, getUndertowOptions(), bufferSize, statisticsEnabled ? connectorStatistics : null));
sc.resumeReceives();
} else {
if (delegate == null) {
UndertowLogger.REQUEST_IO_LOGGER.couldNotInitiateHttp2Connection();
IoUtils.safeClose(channel);
return;