File tree 2 files changed +17
-2
lines changed
main/java/reactor/core/publisher
test/java/reactor/core/publisher
2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -186,9 +186,9 @@ public void onError(Throwable t) {
186
186
produced (p );
187
187
}
188
188
189
- otherArbiter .request (1 );
190
-
191
189
signaller .emitNext (this , Sinks .EmitFailureHandler .FAIL_FAST );
190
+ // request after signalling, otherwise it may race
191
+ otherArbiter .request (1 );
192
192
}
193
193
194
194
@ Override
Original file line number Diff line number Diff line change @@ -1119,4 +1119,19 @@ public void retryWhenWithThrowableFunction() {
1119
1119
.verifyComplete ();
1120
1120
}
1121
1121
1122
+ @ Test
1123
+ void gh2488 () {
1124
+ for (int i = 0 ; i < 1_000 ; i ++) {
1125
+ AtomicInteger sourceHelper = new AtomicInteger ();
1126
+ Flux .just ("hello" )
1127
+ .doOnNext (m -> {
1128
+ if (sourceHelper .getAndIncrement () < 9 ) {
1129
+ throw new RuntimeException ("Boom!" );
1130
+ }
1131
+ })
1132
+ .retryWhen (Retry .fixedDelay (10 , Duration .ofNanos (1 )))
1133
+ .blockFirst (Duration .ofSeconds (1 ));
1134
+ }
1135
+ }
1136
+
1122
1137
}
You can’t perform that action at this time.
0 commit comments