File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed
services-examples/src/main/java/io/scalecube/services/examples/helloworld Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 66import io .scalecube .services .examples .helloworld .service .GreetingServiceImpl ;
77import io .scalecube .services .examples .helloworld .service .api .GreetingsService ;
88import io .scalecube .services .transport .rsocket .RSocketServiceTransport ;
9+ import reactor .core .publisher .Mono ;
910
1011/**
1112 * The Hello World project is a time-honored tradition in computer programming. It is a simple
@@ -50,7 +51,6 @@ public static void main(String[] args) {
5051 // Execute the services and subscribe to service events
5152 service .sayHello ("joe" ).subscribe (consumer -> System .out .println (consumer .message ()));
5253
53- seed .onShutdown ().block ();
54- ms .onShutdown ().block ();
54+ Mono .whenDelayError (seed .shutdown (), ms .shutdown ()).block ();
5555 }
5656}
Original file line number Diff line number Diff line change @@ -70,7 +70,6 @@ public static void main(String[] args) {
7070 System .out .println (greeting .message ());
7171 });
7272
73- seed .onShutdown ().block ();
74- ms .onShutdown ().block ();
73+ Mono .whenDelayError (seed .shutdown (), ms .shutdown ()).block ();
7574 }
7675}
Original file line number Diff line number Diff line change 77import io .scalecube .services .examples .helloworld .service .api .BidiGreetingService ;
88import io .scalecube .services .transport .rsocket .RSocketServiceTransport ;
99import reactor .core .publisher .Flux ;
10+ import reactor .core .publisher .Mono ;
1011
1112/**
1213 * The Hello World project is a time-honored tradition in computer programming. It is a simple
@@ -54,7 +55,6 @@ public static void main(String[] args) {
5455 .doOnNext (System .out ::println )
5556 .blockLast ();
5657
57- seed .onShutdown ().block ();
58- ms .onShutdown ().block ();
58+ Mono .whenDelayError (seed .shutdown (), ms .shutdown ()).block ();
5959 }
6060}
You can’t perform that action at this time.
0 commit comments