Set suppressCancel=true in Mono.fromFuture

This commit is contained in:
Chris Eager authored and Chris Eager committed 2023-09-07 16:06:03 -05:00
1 parent 48f633de11
commit 8348263fab
1 file changed
+4 -1
@@ -360,7 +360,10 @@ public class WebSocketConnection implements MessageAvailabilityListener, Displac
.limitRate(MESSAGE_PUBLISHER_LIMIT_RATE)
.flatMapSequential(envelope ->
Mono.fromFuture(() -> sendMessage(envelope)
.orTimeout(sendFuturesTimeoutMillis, TimeUnit.MILLISECONDS))
.orTimeout(sendFuturesTimeoutMillis, TimeUnit.MILLISECONDS),
// suppressCancel=true, because attempting to cancel the future has no effect, other than
// causing dropped errors
true)
.onErrorResume(
// let the first error pass through to terminate the subscription
e -> {