Catch all exceptions when deserializig session records

This commit is contained in:
AsamK 2021-12-22 11:19:22 +01:00
parent 0da37d0c90
commit 4aa8e3f2f2
2 changed files with 2 additions and 2 deletions

View file

@ -582,7 +582,7 @@ public class SignalAccount implements Closeable {
try {
sessionStore.storeSession(new SignalProtocolAddress(session.address.getIdentifier(),
session.deviceId), new SessionRecord(session.sessionRecord));
} catch (IOException e) {
} catch (Exception e) {
logger.warn("Failed to migrate session, ignoring", e);
}
}

View file

@ -284,7 +284,7 @@ public class SessionStore implements SignalServiceSessionStore {
final var session = new SessionRecord(inputStream.readAllBytes());
cachedSessions.put(key, session);
return session;
} catch (IOException e) {
} catch (Exception e) {
logger.warn("Failed to load session, resetting session: {}", e.getMessage());
return null;
}