Skip to content
This repository was archived by the owner on Mar 19, 2024. It is now read-only.

Commit f712a38

Browse files
committed
Fix unexpected end of stream when connecting with server
1 parent 1f9bff1 commit f712a38

File tree

1 file changed

+3
-3
lines changed
  • owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/http/methods

1 file changed

+3
-3
lines changed

owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/http/methods/HttpBaseMethod.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ abstract class HttpBaseMethod constructor(url: URL) {
4545
var call: Call? = null
4646

4747
var followRedirects: Boolean = true
48-
var retryOnConnectionFailure: Boolean = false
48+
var retryOnConnectionFailure: Boolean = true
4949
var connectionTimeoutVal: Long? = null
5050
var connectionTimeoutUnit: TimeUnit? = null
5151
var readTimeoutVal: Long? = null
@@ -62,8 +62,8 @@ abstract class HttpBaseMethod constructor(url: URL) {
6262
@Throws(Exception::class)
6363
open fun execute(httpClient: HttpClient): Int {
6464
val okHttpClient = httpClient.okHttpClient.newBuilder().apply {
65-
retryOnConnectionFailure.let { retryOnConnectionFailure(it) }
66-
followRedirects.let { followRedirects(it) }
65+
retryOnConnectionFailure(retryOnConnectionFailure)
66+
followRedirects(followRedirects)
6767
readTimeoutUnit?.let { unit ->
6868
readTimeoutVal?.let { readTimeout(it, unit) }
6969
}

0 commit comments

Comments
 (0)