From 0fc7813decc5ddaab72615114c856c7c362bfc6e Mon Sep 17 00:00:00 2001 From: Aleksandra Olemskaia Date: Fri, 5 Sep 2025 11:57:15 +0200 Subject: [PATCH] [settings-sync] IJPL-206145: don't call RegionUrlMapper.tryMapUrlBlocking from EDT in setting sync login GitOrigin-RevId: 570cce127895d17521547c4d68233deb538b2518 --- .../settingsSync/core/config/SettingsSyncConfigurable.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/platform/settings-sync-core/src/com/intellij/settingsSync/core/config/SettingsSyncConfigurable.kt b/platform/settings-sync-core/src/com/intellij/settingsSync/core/config/SettingsSyncConfigurable.kt index b90e0d16f502..608f209754d1 100644 --- a/platform/settings-sync-core/src/com/intellij/settingsSync/core/config/SettingsSyncConfigurable.kt +++ b/platform/settings-sync-core/src/com/intellij/settingsSync/core/config/SettingsSyncConfigurable.kt @@ -653,8 +653,11 @@ internal class SettingsSyncConfigurable(private val coroutineScope: CoroutineSco if (userData != null) { withContext(Dispatchers.EDT) { updateUserAccountsList() - val remoteCommunicator = RemoteCommunicatorHolder.createRemoteCommunicator(provider, userData.id, loginDisposable) ?: return@withContext - if (checkServerState(syncPanelHolder, remoteCommunicator, provider.authService.crossSyncSupported())) { + val serverStateChecked = withContext(Dispatchers.IO) { + val remoteCommunicator = RemoteCommunicatorHolder.createRemoteCommunicator(provider, userData.id, loginDisposable) ?: return@withContext false + checkServerState(syncPanelHolder, remoteCommunicator, provider.authService.crossSyncSupported()) + } + if (serverStateChecked) { SettingsSyncEvents.getInstance().fireLoginStateChanged() val newHolder = UserProviderHolder(userData.id, userData, provider.authService.providerCode, provider.authService.providerName, null) userProviderHolder = newHolder