Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@
import reactor.core.publisher.MonoProcessor;
import reactor.core.scheduler.Scheduler;
import reactor.core.scheduler.Schedulers;
import sun.misc.Signal;
import sun.misc.SignalHandler;

/**
* The ScaleCube-Services module enables to provision and consuming microservices in a cluster.
Expand Down Expand Up @@ -221,7 +219,6 @@ private Mono<Microservices> start() {
// return original error then shutdown
return Mono.whenDelayError(Mono.error(ex), shutdown()).cast(Microservices.class);
})
.doOnSuccess(m -> listenJvmShutdown())
.doOnSuccess(m -> LOGGER.info("[{}][start] Started", id))
.doOnTerminate(scheduler::dispose);
}
Expand Down Expand Up @@ -291,12 +288,6 @@ public Mono<Void> onShutdown() {
return onShutdown;
}

private void listenJvmShutdown() {
SignalHandler handler = signal -> shutdown.onComplete();
Signal.handle(new Signal("TERM"), handler);
Signal.handle(new Signal("INT"), handler);
}

private Mono<Void> doShutdown() {
return Mono.defer(
() -> {
Expand Down