[bs-28] Add /shutdown endpoint to service apps
Disabled by default use container.allow_shutdown=true to switch it on. Then POST to /shutdown to shut down the app. [#48059059]
This commit is contained in:
@@ -56,7 +56,11 @@ public class JettyEmbeddedServletContainer implements EmbeddedServletContainer {
|
||||
@Override
|
||||
public synchronized void stop() {
|
||||
try {
|
||||
this.server.setGracefulShutdown(10000);
|
||||
this.server.stop();
|
||||
} catch (InterruptedException ex) {
|
||||
Thread.currentThread().interrupt();
|
||||
// No drama
|
||||
} catch (Exception ex) {
|
||||
throw new EmbeddedServletContainerException(
|
||||
"Unable to stop embedded Jetty servlet container", ex);
|
||||
|
||||
Reference in New Issue
Block a user