diff --git a/backend/src/ee/services/hsm/hsm-service.ts b/backend/src/ee/services/hsm/hsm-service.ts index 4929c9c181..027a736c2b 100644 --- a/backend/src/ee/services/hsm/hsm-service.ts +++ b/backend/src/ee/services/hsm/hsm-service.ts @@ -80,10 +80,7 @@ export const hsmServiceFactory = ({ hsmModule: { module, graphene } }: THsmServi // Execute the callback and await its result (works for both sync and async) const result = await callbackWithSession(session); - - if (session) { - removeSession(); - } + removeSession(); return result; } finally {