private void closeAndExecuteOnChildChannels(Consumer<Channel> childChannelConsumer) {
    NettyUtils.doInEventLoop(parentChannel.eventLoop(), () -> {
      if (state == RecordState.CLOSED) {
        return;
      }
      state = RecordState.CLOSED;

      // Create a copy of the children, because they may be modified by the consumer.
      List<Http2StreamChannel> childrenToClose = new ArrayList<>(streamChannels.values());
      for (Channel childChannel : childrenToClose) {
        childChannelConsumer.accept(childChannel);
        log.debug("fire exception to stream {} {} pipeline: {}. Active: {}", childChannel.hashCode(), childChannel,
            childChannel.pipeline(), childChannel.isOpen());
      }
    });
  }
Delivers the exception to all registered child channels, and prohibits new streams being created on this connection.
ambry-network/src/main/java/com/github/ambry/network/http2/MultiplexedChannelRecord.java