mirror of
https://github.com/aljazceru/signal-cli.git
synced 2025-12-26 10:34:23 +01:00
Catch all exceptions when deserializig session records
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user