Fixed method

This commit is contained in:
Luca Frosini 2022-03-08 11:25:21 +01:00
parent cf1e6f0602
commit 74182ab00d
1 changed files with 6 additions and 2 deletions

View File

@ -64,10 +64,14 @@ public class SecretManager {
currentSecretHolder.set();
}
public synchronized void endSession() throws Exception {
public synchronized void endSession() {
if (currentSecretHolder != initialSecretHolder) {
currentSecretHolder.reset();
initialSecretHolder.set();
try {
initialSecretHolder.set();
}catch (Exception e) {
throw new RuntimeException(e);
}
currentSecretHolder = initialSecretHolder;
}
}