mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 04:58:45 +00:00
Do not retry thumbnails on terminal status codes.
This commit is contained in:
@@ -156,7 +156,15 @@ class RestoreAttachmentThumbnailJob private constructor(
|
||||
override fun onShouldRetry(exception: Exception): Boolean {
|
||||
if (exception is NonSuccessfulResponseCodeException) {
|
||||
if (exception.code == 404) {
|
||||
Log.w(TAG, "[$attachmentId-thumbnail] Unable to find file")
|
||||
Log.w(TAG, "[$attachmentId-thumbnail] Unable to find file!")
|
||||
return false
|
||||
}
|
||||
if (exception.code == 403) {
|
||||
Log.w(TAG, "[$attachmentId-thumbnail] No permission!")
|
||||
return false
|
||||
}
|
||||
if (exception.code == 555) {
|
||||
Log.w(TAG, "[$attachmentId-thumbnail] Syntetic failure!")
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user