diff --git a/adapters/oidc/installed/src/main/java/org/keycloak/adapters/installed/KeycloakInstalled.java b/adapters/oidc/installed/src/main/java/org/keycloak/adapters/installed/KeycloakInstalled.java index 9188ee6df2..59811285e6 100644 --- a/adapters/oidc/installed/src/main/java/org/keycloak/adapters/installed/KeycloakInstalled.java +++ b/adapters/oidc/installed/src/main/java/org/keycloak/adapters/installed/KeycloakInstalled.java @@ -637,7 +637,11 @@ public class KeycloakInstalled { } public void stop() { - server.stop(); + try { + server.stop(); + } catch (Exception ignore) { + // it is OK to happen if thread is modified while stopping the server, specially when a security manager is enabled + } } public int getLocalPort() {