kopia lustrzana https://github.com/ryukoposting/Signal-Android
Avoid potential race condition in attachment uploads.
rodzic
04bb4b351a
commit
a65c4f90f4
|
@ -353,12 +353,13 @@ public class SignalServiceMessageSender {
|
||||||
attachment.getListener(),
|
attachment.getListener(),
|
||||||
attachment.getCancelationSignal());
|
attachment.getCancelationSignal());
|
||||||
|
|
||||||
AttachmentUploadAttributes uploadAttributes = null;
|
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...");
|
Log.d(TAG, "Using pipe to retrieve attachment upload attributes...");
|
||||||
try {
|
try {
|
||||||
uploadAttributes = pipe.get().get().getAttachmentUploadAttributes();
|
uploadAttributes = localPipe.get().getAttachmentUploadAttributes();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Log.w(TAG, "Failed to retrieve attachment upload attributes using pipe. Falling back...");
|
Log.w(TAG, "Failed to retrieve attachment upload attributes using pipe. Falling back...");
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue