From 9e9649c030f35b5aceed14261e96db16f8c87ef3 Mon Sep 17 00:00:00 2001 From: Oleh Dokuka <5380167+OlegDokuka@users.noreply.github.com> Date: Mon, 13 Nov 2023 21:45:00 +0200 Subject: [PATCH] makes `throwable` assignment HB `done` assignment in `onError` (#3638) Signed-off-by: Oleh Dokuka --- .../src/main/java/reactor/core/publisher/FluxPublish.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/reactor-core/src/main/java/reactor/core/publisher/FluxPublish.java b/reactor-core/src/main/java/reactor/core/publisher/FluxPublish.java index ef0d7587bf..b3211b1200 100644 --- a/reactor-core/src/main/java/reactor/core/publisher/FluxPublish.java +++ b/reactor-core/src/main/java/reactor/core/publisher/FluxPublish.java @@ -316,11 +316,13 @@ public void onError(Throwable t) { return; } - done = true; if (!Exceptions.addThrowable(ERROR, this, t)) { Operators.onErrorDroppedMulticast(t, subscribers); + return; } + done = true; + long previousState = markTerminated(this); if (isTerminated(previousState) || isCancelled(previousState)) { return;