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") } }