Skip to content

Commit 9b65908

Browse files
committed
Rename server's gracefulShutdownTimeout field to match the property
1 parent a73c7df commit 9b65908

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

grpc-server-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/server/serverfactory/GrpcServerLifecycle.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,19 @@ public class GrpcServerLifecycle implements SmartLifecycle {
4040
private static AtomicInteger serverCounter = new AtomicInteger(-1);
4141

4242
private final GrpcServerFactory factory;
43-
private final Duration gracefulShutdownTimeout;
43+
private final Duration shutdownGracePeriod;
4444

4545
private Server server;
4646

4747
/**
4848
* Creates a new GrpcServerLifecycle
4949
*
5050
* @param factory The server factory to use.
51-
* @param gracefulShutdownTimeout The time to wait for the server to gracefully shut down.
51+
* @param shutdownGracePeriod The time to wait for the server to gracefully shut down.
5252
*/
53-
public GrpcServerLifecycle(final GrpcServerFactory factory, final Duration gracefulShutdownTimeout) {
53+
public GrpcServerLifecycle(final GrpcServerFactory factory, final Duration shutdownGracePeriod) {
5454
this.factory = requireNonNull(factory, "factory");
55-
this.gracefulShutdownTimeout = requireNonNull(gracefulShutdownTimeout, "gracefulShutdownTimeout");
55+
this.shutdownGracePeriod = requireNonNull(shutdownGracePeriod, "shutdownGracePeriod");
5656
}
5757

5858
@Override
@@ -124,7 +124,7 @@ protected void createAndStartGrpcServer() throws IOException {
124124
protected void stopAndReleaseGrpcServer() {
125125
final Server localServer = this.server;
126126
if (localServer != null) {
127-
final long millis = this.gracefulShutdownTimeout.toMillis();
127+
final long millis = this.shutdownGracePeriod.toMillis();
128128
log.debug("Initiating gRPC server shutdown");
129129
localServer.shutdown();
130130
// Wait for the server to shutdown completely before continuing with destroying the spring context

0 commit comments

Comments
 (0)