Skip to content

Commit

Permalink
Merge pull request #677 from grote/webdav-timeouts
Browse files Browse the repository at this point in the history
Increase WebDAV timeouts and declare body one-shot
  • Loading branch information
theimpulson committed Jun 12, 2024
2 parents af15b4a + e76ab1c commit 1b7686d
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ internal abstract class WebDavStorage(
.followRedirects(false)
.authenticator(authHandler)
.addNetworkInterceptor(authHandler)
.connectTimeout(15, TimeUnit.SECONDS)
.writeTimeout(30, TimeUnit.SECONDS)
.readTimeout(120, TimeUnit.SECONDS)
.connectTimeout(30, TimeUnit.SECONDS)
.writeTimeout(60, TimeUnit.SECONDS)
.readTimeout(240, TimeUnit.SECONDS)
.pingInterval(45, TimeUnit.SECONDS)
.connectionSpecs(listOf(ConnectionSpec.MODERN_TLS))
.retryOnConnectionFailure(true)
Expand All @@ -73,6 +73,7 @@ internal abstract class WebDavStorage(
val pipedOutputStream = PipedCloseActionOutputStream(pipedInputStream)

val body = object : RequestBody() {
override fun isOneShot(): Boolean = true
override fun contentType() = "application/octet-stream".toMediaType()
override fun writeTo(sink: BufferedSink) {
pipedInputStream.use { inputStream ->
Expand Down

0 comments on commit 1b7686d

Please sign in to comment.