diff --git a/rsocket/src/main/java/com/baeldung/rsocket/FireNForgetClient.java b/rsocket/src/main/java/com/baeldung/rsocket/FireNForgetClient.java index 6c7362a008..496b3fc5c9 100644 --- a/rsocket/src/main/java/com/baeldung/rsocket/FireNForgetClient.java +++ b/rsocket/src/main/java/com/baeldung/rsocket/FireNForgetClient.java @@ -38,8 +38,7 @@ public class FireNForgetClient { Flux.interval(Duration.ofMillis(50)) .take(data.size()) .map(this::createFloatPayload) - .map(socket::fireAndForget) - .flatMap(Function.identity()) + .flatMap(socket::fireAndForget) .blockLast(); }