mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-25 04:06:14 +00:00
Don't allow rate limit responses to end all group sends.
This commit is contained in:
committed by
Alex Hart
parent
0ddfb4456b
commit
e701e4bff0
@@ -405,8 +405,13 @@ public final class PushGroupSendJob extends PushSendJob {
|
||||
|
||||
RetrieveProfileJob.enqueue(mismatchRecipientIds);
|
||||
} else if (!networkFailures.isEmpty()) {
|
||||
Log.w(TAG, "Retrying because there were " + networkFailures.size() + " network failures.");
|
||||
throw new RetryLaterException();
|
||||
long retryAfter = results.stream()
|
||||
.filter(r -> r.getRateLimitFailure() != null)
|
||||
.map(r -> r.getRateLimitFailure().getRetryAfterMilliseconds().or(-1L))
|
||||
.max(Long::compare)
|
||||
.orElse(-1L);
|
||||
Log.w(TAG, "Retrying because there were " + networkFailures.size() + " network failures. retryAfter: " + retryAfter);
|
||||
throw new RetryLaterException(retryAfter);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user