mirror of
https://github.com/keycloak/keycloak.git
synced 2026-01-09 23:12:06 -03:30
Cleaning up threadlocals to prevent (small) memory leak
Closes #43759 Signed-off-by: Alexander Schwartz <alexander.schwartz@ibm.com>
This commit is contained in:
parent
b537fc954a
commit
ba0fe9bd70
@ -253,6 +253,8 @@ public class LiquibaseJpaUpdaterProvider implements JpaUpdaterProvider {
|
||||
}
|
||||
} catch (LiquibaseException e) {
|
||||
throw new RuntimeException("Failed to validate database", e);
|
||||
} finally {
|
||||
ThreadLocalSessionContext.removeCurrentSession();
|
||||
}
|
||||
|
||||
return Status.VALID;
|
||||
|
||||
@ -251,6 +251,8 @@ public class QuarkusJpaUpdaterProvider implements JpaUpdaterProvider {
|
||||
}
|
||||
} catch (LiquibaseException e) {
|
||||
throw new RuntimeException("Failed to validate database", e);
|
||||
} finally {
|
||||
ThreadLocalSessionContext.removeCurrentSession();
|
||||
}
|
||||
|
||||
return Status.VALID;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user