From 4caf333769c94118b20ffddb30254feadb56d156 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 27 Jul 2021 09:59:01 +0200 Subject: [PATCH] Do not check the baseURL to override if it is the same than the one previously known and used --- .../java/org/matrix/android/sdk/internal/auth/SessionCreator.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/SessionCreator.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/SessionCreator.kt index 160fd2d556..cc00c963ea 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/SessionCreator.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/SessionCreator.kt @@ -49,6 +49,8 @@ internal class DefaultSessionCreator @Inject constructor( // remove trailing "/" ?.trim { it == '/' } ?.takeIf { it.isNotBlank() } + // It can be the same value, so in this case, do not check again the validity + ?.takeIf { it != homeServerConnectionConfig.homeServerUriBase.toString() } ?.also { Timber.d("Overriding homeserver url to $it (will check if valid)") } ?.let { Uri.parse(it) } ?.takeIf {