mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 02:20:39 +00:00
Add another missing close()
This commit is contained in:
parent
5b839bbae0
commit
eb0860d350
1 changed files with 10 additions and 6 deletions
|
@ -1372,13 +1372,17 @@ class Manager implements Signal {
|
||||||
|
|
||||||
if (groupsFile.exists() && groupsFile.length() > 0) {
|
if (groupsFile.exists() && groupsFile.length() > 0) {
|
||||||
FileInputStream contactsFileStream = new FileInputStream(groupsFile);
|
FileInputStream contactsFileStream = new FileInputStream(groupsFile);
|
||||||
SignalServiceAttachmentStream attachmentStream = SignalServiceAttachment.newStreamBuilder()
|
try {
|
||||||
.withStream(contactsFileStream)
|
SignalServiceAttachmentStream attachmentStream = SignalServiceAttachment.newStreamBuilder()
|
||||||
.withContentType("application/octet-stream")
|
.withStream(contactsFileStream)
|
||||||
.withLength(groupsFile.length())
|
.withContentType("application/octet-stream")
|
||||||
.build();
|
.withLength(groupsFile.length())
|
||||||
|
.build();
|
||||||
|
|
||||||
sendSyncMessage(SignalServiceSyncMessage.forGroups(attachmentStream));
|
sendSyncMessage(SignalServiceSyncMessage.forGroups(attachmentStream));
|
||||||
|
} finally {
|
||||||
|
contactsFileStream.close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
groupsFile.delete();
|
groupsFile.delete();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue