You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Eagerly remove Conversation on complete to avoid cancellation if the conversation is already completed (e.g. concatMap(close())).
Remove error logging in FluxDiscardOnCancel to avoid unnecessary noise.
[#231]
while ((receiver = this.messageSubscriber.conversations.poll()) != null) {
455
-
receiver.sink.error(supplier.get());
456
+
receiver.onError(supplier.get());
456
457
}
457
458
458
459
if (!this.notificationProcessor.isTerminated()) {
@@ -642,27 +643,55 @@ private long decrementDemand() {
642
643
}
643
644
644
645
/**
645
-
* Emit a {@link BackendMessage}. Returns whether the emission should be continued by returning {@literal true} or whether the conversation is complete by returning {@literal false}.
646
+
* Check whether the {@link BackendMessage} can complete the conversation.
646
647
*
647
648
* @param item
648
649
* @return
649
650
*/
650
-
publicbooleanemit(BackendMessageitem) {
651
+
publicbooleancanComplete(BackendMessageitem) {
652
+
returnthis.takeUntil.test(item);
653
+
}
651
654
652
-
if (this.sink.isCancelled()) {
653
-
ReferenceCountUtil.release(item);
655
+
/**
656
+
* Complete the conversation.
657
+
*
658
+
* @param item
659
+
* @return
660
+
*/
661
+
publicvoidcomplete(BackendMessageitem) {
662
+
663
+
ReferenceCountUtil.release(item);
664
+
if (!this.sink.isCancelled()) {
665
+
this.sink.complete();
654
666
}
667
+
}
655
668
656
-
if (this.takeUntil.test(item)) {
669
+
/**
670
+
* Emit a {@link BackendMessage}.
671
+
*
672
+
* @param item
673
+
* @return
674
+
*/
675
+
publicvoidemit(BackendMessageitem) {
676
+
677
+
if (this.sink.isCancelled()) {
657
678
ReferenceCountUtil.release(item);
658
-
this.sink.complete();
659
-
returnfalse;
660
679
}
661
680
662
681
decrementDemand();
663
682
this.sink.next(item);
683
+
}
664
684
665
-
returntrue;
685
+
/**
686
+
* Notify the conversation about an error. Drops errors silently if the conversation is finished.
0 commit comments