Catch all exceptions when deserializig session records
This commit is contained in:
parent
0da37d0c90
commit
4aa8e3f2f2
@ -582,7 +582,7 @@ public class SignalAccount implements Closeable {
|
|||||||
try {
|
try {
|
||||||
sessionStore.storeSession(new SignalProtocolAddress(session.address.getIdentifier(),
|
sessionStore.storeSession(new SignalProtocolAddress(session.address.getIdentifier(),
|
||||||
session.deviceId), new SessionRecord(session.sessionRecord));
|
session.deviceId), new SessionRecord(session.sessionRecord));
|
||||||
} catch (IOException e) {
|
} catch (Exception e) {
|
||||||
logger.warn("Failed to migrate session, ignoring", 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());
|
final var session = new SessionRecord(inputStream.readAllBytes());
|
||||||
cachedSessions.put(key, session);
|
cachedSessions.put(key, session);
|
||||||
return session;
|
return session;
|
||||||
} catch (IOException e) {
|
} catch (Exception e) {
|
||||||
logger.warn("Failed to load session, resetting session: {}", e.getMessage());
|
logger.warn("Failed to load session, resetting session: {}", e.getMessage());
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user