mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-02 00:17:41 +01:00
Fix deadlock when sending media to story and group chat simultaneously.
This commit is contained in:
committed by
Alex Hart
parent
57574126bb
commit
e125fa6bfb
@@ -425,14 +425,6 @@ public class MessageSender {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (AttachmentId attachmentId : attachmentsWithPreuploadId) {
|
|
||||||
long messageId = SignalDatabase.attachments().getMessageId(attachmentId);
|
|
||||||
if (BackupRepository.shouldCopyAttachmentToArchive(attachmentId, messageId)) {
|
|
||||||
Log.i(TAG, "[" + attachmentId + "] Was previously preuploaded and should now be copied to the archive.");
|
|
||||||
jobManager.add(new CopyAttachmentToArchiveJob(attachmentId));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onMessageSent();
|
onMessageSent();
|
||||||
mmsDatabase.setTransactionSuccessful();
|
mmsDatabase.setTransactionSuccessful();
|
||||||
} catch (MmsException e) {
|
} catch (MmsException e) {
|
||||||
@@ -442,6 +434,14 @@ public class MessageSender {
|
|||||||
mmsDatabase.endTransaction();
|
mmsDatabase.endTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (AttachmentId attachmentId : attachmentsWithPreuploadId) {
|
||||||
|
long messageId = SignalDatabase.attachments().getMessageId(attachmentId);
|
||||||
|
if (BackupRepository.shouldCopyAttachmentToArchive(attachmentId, messageId)) {
|
||||||
|
Log.i(TAG, "[" + attachmentId + "] Was previously preuploaded and should now be copied to the archive.");
|
||||||
|
jobManager.add(new CopyAttachmentToArchiveJob(attachmentId));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < messageIds.size(); i++) {
|
for (int i = 0; i < messageIds.size(); i++) {
|
||||||
long messageId = messageIds.get(i);
|
long messageId = messageIds.get(i);
|
||||||
Recipient recipient = messages.get(i).getThreadRecipient();
|
Recipient recipient = messages.get(i).getThreadRecipient();
|
||||||
|
|||||||
Reference in New Issue
Block a user