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
pull/32234/head
Phillip Webb 2 years ago
parent 45ad1557c3
commit d540eefce0

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -48,6 +48,7 @@ class WebServerStartStopLifecycle implements SmartLifecycle {
@Override @Override
public void stop() { public void stop() {
this.running = false;
this.webServer.stop(); this.webServer.stop();
} }

Loading…
Cancel
Save