mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-24 16:14:26 +08:00
Call Jetty#destroy when shutting down webserver
Affects issues: - Possibly fixed #2518
This commit is contained in:
parent
053fe2528b
commit
fa6c7232a9
@ -69,6 +69,7 @@ public class JettyWebserver implements WebServer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
webserver = new Server();
|
webserver = new Server();
|
||||||
|
webserver.setStopAtShutdown(true);
|
||||||
|
|
||||||
this.port = webserverConfiguration.getPort();
|
this.port = webserverConfiguration.getPort();
|
||||||
|
|
||||||
@ -193,7 +194,12 @@ public class JettyWebserver implements WebServer {
|
|||||||
@Override
|
@Override
|
||||||
public void disable() {
|
public void disable() {
|
||||||
try {
|
try {
|
||||||
if (webserver != null) webserver.stop();
|
if (webserver != null) {
|
||||||
|
webserver.stop();
|
||||||
|
webserver.destroy();
|
||||||
|
}
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
Thread.currentThread().interrupt();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new IllegalStateException(e);
|
throw new IllegalStateException(e);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user