Skip to content

Commit

Permalink
Classify StreamResetException transient in WebDavBackend
Browse files Browse the repository at this point in the history
  • Loading branch information
grote committed Jan 15, 2025
1 parent d3e63e8 commit f2665fa
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import okhttp3.HttpUrl.Companion.toHttpUrl
import okhttp3.MediaType.Companion.toMediaType
import okhttp3.OkHttpClient
import okhttp3.RequestBody
import okhttp3.internal.http2.StreamResetException
import okio.BufferedSink
import org.calyxos.seedvault.core.backends.AppBackupFileType
import org.calyxos.seedvault.core.backends.Backend
Expand Down Expand Up @@ -354,6 +355,9 @@ public class WebDavBackend(
return true
} else if (e is UnknownHostException) {
return true // gets thrown when phone leaves WiFi range
} else if (e is StreamResetException) {
// https://github.com/seedvault-app/seedvault/pull/835#issuecomment-2591170084
return true
} else if (e is EOFException && e.message?.contains("\\n not found") == true) {
return true
}
Expand Down

0 comments on commit f2665fa

Please sign in to comment.