From b8f87941a580ab0f6ff9a877635a77a2917d7da3 Mon Sep 17 00:00:00 2001 From: a10zn8 Date: Tue, 5 Nov 2024 20:34:17 +0300 Subject: [PATCH] fix shutdown (#590) --- src/main/kotlin/io/emeraldpay/dshackle/GrpcServer.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/io/emeraldpay/dshackle/GrpcServer.kt b/src/main/kotlin/io/emeraldpay/dshackle/GrpcServer.kt index 2e9136ba..3dd03cb7 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/GrpcServer.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/GrpcServer.kt @@ -130,7 +130,8 @@ open class GrpcServer( @PreDestroy fun stop() { log.info("Shutting down GRPC Server...") - server?.shutdownNow() + server?.shutdown() + server?.awaitTermination(10, TimeUnit.SECONDS) log.info("GRPC Server shot down") } }