mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-07-08 06:54:09 +01:00
Improve error handling resiliance.
This commit is contained in:
@@ -19,6 +19,7 @@ import org.thoughtcrime.securesms.recipients.RecipientId;
|
||||
import org.thoughtcrime.securesms.recipients.RecipientUtil;
|
||||
import org.whispersystems.signalservice.api.push.SignalServiceAddress;
|
||||
import org.whispersystems.signalservice.api.push.exceptions.PushNetworkException;
|
||||
import org.whispersystems.signalservice.api.push.exceptions.RateLimitException;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
@@ -97,7 +98,7 @@ public final class SendRetryReceiptJob extends BaseJob {
|
||||
|
||||
@Override
|
||||
protected boolean onShouldRetry(@NonNull Exception e) {
|
||||
return e instanceof PushNetworkException;
|
||||
return e instanceof PushNetworkException || e instanceof RateLimitException;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -341,7 +341,7 @@ object MessageDecryptor {
|
||||
|
||||
if (contentHint == ContentHint.IMPLICIT) {
|
||||
Log.w(TAG, "${logPrefix(envelope, senderServiceId)} The content hint is $contentHint, so no error message is needed.", true)
|
||||
Result.Ignore(envelope, serverDeliveredTimestamp, followUpOperations)
|
||||
return Result.Ignore(envelope, serverDeliveredTimestamp, followUpOperations)
|
||||
} else {
|
||||
Log.w(TAG, "${logPrefix(envelope, senderServiceId)} The content hint is $contentHint, so we need to insert an error right away.", true)
|
||||
return Result.DecryptionError(envelope, serverDeliveredTimestamp, protocolException.toErrorMetadata(), followUpOperations.toUnmodifiableList())
|
||||
|
||||
Reference in New Issue
Block a user