mirror of
https://github.com/AsamK/signal-cli.git
synced 2026-05-16 13:01:49 +00:00
Add commits in early returns
This commit is contained in:
parent
132dfb95dc
commit
e9eabbeeb5
@ -152,6 +152,7 @@ public class GroupStore {
|
||||
statement.setBytes(2, groupId.serialize());
|
||||
final var result = Utils.executeQueryForOptional(statement, Utils::getIdMapper);
|
||||
if (result.isEmpty()) {
|
||||
connection.commit();
|
||||
return;
|
||||
}
|
||||
internalId = result.get();
|
||||
|
||||
@ -303,6 +303,7 @@ public class MessageSendLogStore implements AutoCloseable {
|
||||
}
|
||||
if (contentId == -1) {
|
||||
logger.warn("Failed to insert message send log content");
|
||||
connection.commit();
|
||||
return -1;
|
||||
}
|
||||
insertRecipientsForExistingContent(contentId, recipientDevices, connection);
|
||||
|
||||
@ -194,8 +194,9 @@ public class SessionStore implements SignalServiceSessionStore {
|
||||
if (session != null) {
|
||||
session.archiveCurrentState();
|
||||
storeSession(connection, key, session);
|
||||
connection.commit();
|
||||
|
||||
}
|
||||
connection.commit();
|
||||
} catch (SQLException e) {
|
||||
throw new RuntimeException("Failed update session store", e);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user