mirror of
https://github.com/owncloud/android-library.git
synced 2025-06-07 07:56:19 +00:00
Merge pull request #490 from owncloud/fix/eos
Fix unexpected end of stream when connecting with server
This commit is contained in:
commit
2dc6f30a5e
@ -45,7 +45,7 @@ abstract class HttpBaseMethod constructor(url: URL) {
|
||||
var call: Call? = null
|
||||
|
||||
var followRedirects: Boolean = true
|
||||
var retryOnConnectionFailure: Boolean = false
|
||||
var retryOnConnectionFailure: Boolean = true
|
||||
var connectionTimeoutVal: Long? = null
|
||||
var connectionTimeoutUnit: TimeUnit? = null
|
||||
var readTimeoutVal: Long? = null
|
||||
@ -62,8 +62,8 @@ abstract class HttpBaseMethod constructor(url: URL) {
|
||||
@Throws(Exception::class)
|
||||
open fun execute(httpClient: HttpClient): Int {
|
||||
val okHttpClient = httpClient.okHttpClient.newBuilder().apply {
|
||||
retryOnConnectionFailure.let { retryOnConnectionFailure(it) }
|
||||
followRedirects.let { followRedirects(it) }
|
||||
retryOnConnectionFailure(retryOnConnectionFailure)
|
||||
followRedirects(followRedirects)
|
||||
readTimeoutUnit?.let { unit ->
|
||||
readTimeoutVal?.let { readTimeout(it, unit) }
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user