Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,13 @@ public void stop() {
log.info("Stopping REST server");

try {
if (handlers.isRunning()) {
for (Handler handler : handlers.getHandlers()) {
if (handler != null) {
Utils.closeQuietly(handler::stop, handler.toString());
}
}
}
for (ConnectRestExtension connectRestExtension : connectRestExtensions) {
try {
connectRestExtension.close();
Expand All @@ -358,8 +365,13 @@ public void stop() {
jettyServer.stop();
jettyServer.join();
} catch (Exception e) {
jettyServer.destroy();
throw new ConnectException("Unable to stop REST server", e);
} finally {
try {
jettyServer.destroy();
} catch (Exception e) {
log.error("Unable to destroy REST server", e);
}
}

log.info("REST server stopped");
Expand Down