6161import reactor .core .publisher .Mono ;
6262import reactor .core .publisher .SignalType ;
6363import reactor .core .publisher .Sinks ;
64- import reactor .core .publisher .Sinks .EmitFailureHandler ;
6564import reactor .core .publisher .Sinks .EmitResult ;
6665import reactor .core .scheduler .Scheduler ;
6766import reactor .core .scheduler .Schedulers ;
@@ -172,7 +171,7 @@ private Microservices(Builder builder) {
172171 shutdown
173172 .asMono ()
174173 .then (doShutdown ())
175- .doFinally (s -> onShutdown .emitEmpty (RetryEmitFailureHandler . INSTANCE ))
174+ .doFinally (s -> onShutdown .emitEmpty (EmitFailureHandler . RETRY_NOT_SERIALIZED ))
176175 .subscribe (
177176 null , ex -> LOGGER .warn ("[{}][doShutdown] Exception occurred: {}" , id , ex .toString ()));
178177 }
@@ -351,7 +350,7 @@ public Flux<ServiceDiscoveryEvent> listenDiscovery() {
351350 public Mono <Void > shutdown () {
352351 return Mono .defer (
353352 () -> {
354- shutdown .emitEmpty (RetryEmitFailureHandler . INSTANCE );
353+ shutdown .emitEmpty (EmitFailureHandler . RETRY_NOT_SERIALIZED );
355354 return onShutdown .asMono ();
356355 });
357356 }
@@ -650,7 +649,7 @@ private Mono<? extends Void> start0(String id, ServiceDiscovery discovery) {
650649 .subscribeOn (scheduler )
651650 .publishOn (scheduler )
652651 .doOnNext (event -> onDiscoveryEvent (microservices , event ))
653- .doOnNext (event -> sink .emitNext (event , RetryEmitFailureHandler . INSTANCE ))
652+ .doOnNext (event -> sink .emitNext (event , EmitFailureHandler . RETRY_NOT_SERIALIZED ))
654653 .subscribe ());
655654
656655 return Mono .deferContextual (context -> discovery .start ())
@@ -674,7 +673,7 @@ public Mono<Void> shutdown() {
674673 return Mono .defer (
675674 () -> {
676675 disposables .dispose ();
677- sink .emitComplete (RetryEmitFailureHandler . INSTANCE );
676+ sink .emitComplete (EmitFailureHandler . RETRY_NOT_SERIALIZED );
678677 return Mono .whenDelayError (
679678 discoveryInstances .values ().stream ()
680679 .map (ServiceDiscovery ::shutdown )
@@ -911,9 +910,9 @@ private static String asString(ServiceInfo serviceInfo) {
911910 }
912911 }
913912
914- private static class RetryEmitFailureHandler implements EmitFailureHandler {
913+ private static class EmitFailureHandler implements Sinks . EmitFailureHandler {
915914
916- private static final RetryEmitFailureHandler INSTANCE = new RetryEmitFailureHandler ();
915+ private static final EmitFailureHandler RETRY_NOT_SERIALIZED = new EmitFailureHandler ();
917916
918917 @ Override
919918 public boolean onEmitFailure (SignalType signalType , EmitResult emitResult ) {
0 commit comments