diff --git a/reactor-netty-core/src/main/java/reactor/netty/channel/MonoSendMany.java b/reactor-netty-core/src/main/java/reactor/netty/channel/MonoSendMany.java index d6c0b5cb1b..96453aa27e 100644 --- a/reactor-netty-core/src/main/java/reactor/netty/channel/MonoSendMany.java +++ b/reactor-netty-core/src/main/java/reactor/netty/channel/MonoSendMany.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2021 VMware, Inc. or its affiliates, All Rights Reserved. + * Copyright (c) 2019-2022 VMware, Inc. or its affiliates, All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,6 +23,7 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicIntegerFieldUpdater; import java.util.concurrent.atomic.AtomicReferenceFieldUpdater; +import java.util.function.BiConsumer; import java.util.function.Consumer; import java.util.function.Function; import java.util.function.Predicate; @@ -746,6 +747,12 @@ public Context delete(Object key) { .delete(key); } + @Override + public void forEach(BiConsumer action) { + action.accept(KEY_ON_DISCARD, this); + actualContext.delete(KEY_ON_DISCARD).forEach(action); + } + @Override public int size() { Context context = actualContext;