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
This commit is contained in:
Phillip Webb 2022-08-03 12:33:35 +01:00
parent 45ad1557c3
commit d540eefce0

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2020 the original author or authors.
* Copyright 2012-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -48,6 +48,7 @@ class WebServerStartStopLifecycle implements SmartLifecycle {
@Override
public void stop() {
this.running = false;
this.webServer.stop();
}