Improved socket fallback for attachment v2
This commit is contained in:
parent
1aebce8d6e
commit
eed1625965
@ -332,12 +332,18 @@ public class SignalServiceMessageSender {
|
||||
new AttachmentCipherOutputStreamFactory(attachmentKey),
|
||||
attachment.getListener());
|
||||
|
||||
AttachmentUploadAttributes uploadAttributes;
|
||||
AttachmentUploadAttributes uploadAttributes = null;
|
||||
|
||||
if (pipe.get().isPresent()) {
|
||||
Log.d(TAG, "Using pipe to retrieve attachment upload attributes...");
|
||||
uploadAttributes = pipe.get().get().getAttachmentUploadAttributes();
|
||||
} else {
|
||||
try {
|
||||
uploadAttributes = pipe.get().get().getAttachmentUploadAttributes();
|
||||
} catch (IOException e) {
|
||||
Log.w(TAG, "Failed to retrieve attachment upload attributes using pipe. Falling back...");
|
||||
}
|
||||
}
|
||||
|
||||
if (uploadAttributes == null) {
|
||||
Log.d(TAG, "Not using pipe to retrieve attachment upload attributes...");
|
||||
uploadAttributes = socket.getAttachmentUploadAttributes();
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user