From 1d01565262dd20e4dd985179aab53d3762a35eab Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Mon, 9 Nov 2015 14:28:53 +0100 Subject: [PATCH] fix duplicate plugin update notifications: don't queue the next plugin update while the network request from the previous update is still running --- idea/src/org/jetbrains/kotlin/idea/KotlinPluginUpdater.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/idea/src/org/jetbrains/kotlin/idea/KotlinPluginUpdater.kt b/idea/src/org/jetbrains/kotlin/idea/KotlinPluginUpdater.kt index ec24f682ba7..e2c69c8ca53 100644 --- a/idea/src/org/jetbrains/kotlin/idea/KotlinPluginUpdater.kt +++ b/idea/src/org/jetbrains/kotlin/idea/KotlinPluginUpdater.kt @@ -71,8 +71,6 @@ class KotlinPluginUpdater(val propertiesComponent: PropertiesComponent) : Dispos private fun updateCheck() { try { - checkQueued = false - var (mainRepoUpdateSuccess, latestVersionInRepository) = getPluginVersionFromMainRepository() var descriptorToInstall: IdeaPluginDescriptor? = null var hostToInstallFrom: String? = null @@ -94,6 +92,8 @@ class KotlinPluginUpdater(val propertiesComponent: PropertiesComponent) : Dispos } } + checkQueued = false + if (mainRepoUpdateSuccess || latestVersionInRepository != null) { recordSuccessfulUpdateCheck() if (latestVersionInRepository != null && VersionComparatorUtil.compare(latestVersionInRepository, KotlinPluginUtil.getPluginVersion()) > 0) {