mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-16 20:59:54 +01:00
If worker is destroyed during upload, delete file before returning.
This commit is contained in:
@@ -328,13 +328,13 @@ class MailboxUploadWorker implements MailboxWorker, ConnectivityObserver,
|
|||||||
LOG.info("Uploading file");
|
LOG.info("Uploading file");
|
||||||
mailboxApi.addFile(mailboxProperties, folderId, file);
|
mailboxApi.addFile(mailboxProperties, folderId, file);
|
||||||
markMessagesSentOrAcked(sessionRecord);
|
markMessagesSentOrAcked(sessionRecord);
|
||||||
|
delete(file);
|
||||||
synchronized (lock) {
|
synchronized (lock) {
|
||||||
if (state != State.WRITING_UPLOADING) return;
|
if (state != State.WRITING_UPLOADING) return;
|
||||||
state = State.CHECKING_FOR_DATA;
|
state = State.CHECKING_FOR_DATA;
|
||||||
apiCall = null;
|
apiCall = null;
|
||||||
this.file = null;
|
this.file = null;
|
||||||
}
|
}
|
||||||
delete(file);
|
|
||||||
checkForDataToSend();
|
checkForDataToSend();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user