Improve logging of base URL recovery

This commit is contained in:
Kirill Kamakin
2022-12-21 22:26:50 +01:00
parent 8e509894f8
commit e8077f460a

View File

@@ -46,7 +46,7 @@ class BaseURLViewModel @Inject constructor(
}
val result: Result<Unit> = serverInfoRepo.tryBaseURL(url).recoverCatching {
logger.e(it) { "checkBaseURL: trying to recover" }
logger.e(it) { "checkBaseURL: trying to recover, had prefix = $hasPrefix" }
if (hasPrefix.not() && it.cause is SSLHandshakeException) {
val unencryptedUrl = url.replace("https", "http")
serverInfoRepo.tryBaseURL(unencryptedUrl).getOrThrow()