mirror of
https://github.com/oxen-io/session-android.git
synced 2025-06-30 23:18:28 +00:00
Avoid potential race condition in attachment uploads.
This commit is contained in:
parent
04bb4b351a
commit
a65c4f90f4
@ -354,11 +354,12 @@ public class SignalServiceMessageSender {
|
||||
attachment.getCancelationSignal());
|
||||
|
||||
AttachmentUploadAttributes uploadAttributes = null;
|
||||
Optional<SignalServiceMessagePipe> localPipe = pipe.get();
|
||||
|
||||
if (pipe.get().isPresent()) {
|
||||
if (localPipe.isPresent()) {
|
||||
Log.d(TAG, "Using pipe to retrieve attachment upload attributes...");
|
||||
try {
|
||||
uploadAttributes = pipe.get().get().getAttachmentUploadAttributes();
|
||||
uploadAttributes = localPipe.get().getAttachmentUploadAttributes();
|
||||
} catch (IOException e) {
|
||||
Log.w(TAG, "Failed to retrieve attachment upload attributes using pipe. Falling back...");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user