Skip to content

Commit d540eef

Browse files
committed
Set running to false when stop method is called
Update `WebServerStartStopLifecycle` to change the `running` state when the `stop()` method is called. Fixes gh-31966
1 parent 45ad155 commit d540eef

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/context/WebServerStartStopLifecycle.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2020 the original author or authors.
2+
* Copyright 2012-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -48,6 +48,7 @@ public void start() {
4848

4949
@Override
5050
public void stop() {
51+
this.running = false;
5152
this.webServer.stop();
5253
}
5354

0 commit comments

Comments
 (0)