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

Commit 8eaa98a

Browse files
theScrabiabelgardep
authored andcommitted
accept ssl connections for status when OK is returned
1 parent 6ea9f99 commit 8eaa98a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/status/GetRemoteStatusOperation.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ class GetRemoteStatusOperation : RemoteOperation<OwnCloudVersion>() {
4949
client.baseUri = buildFullHttpsUrl(client.baseUri)
5050

5151
var result = tryToConnect(client)
52-
if (result.code != ResultCode.OK_SSL && !result.isSslRecoverableException) {
52+
if (!(result.code == ResultCode.OK || result.code == ResultCode.OK_SSL)
53+
&& !result.isSslRecoverableException
54+
) {
5355
Timber.d("Establishing secure connection failed, trying non secure connection")
5456
client.baseUri = client.baseUri.buildUpon().scheme(HTTP_SCHEME).build()
5557
result = tryToConnect(client)

0 commit comments

Comments
 (0)