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