From 209dbae893a1a1f19921cbcb51f98e230b927c31 Mon Sep 17 00:00:00 2001 From: "Alexander.Likhachev" Date: Mon, 4 Dec 2023 09:37:20 +0100 Subject: [PATCH] [Daemon] Make daemon port validator more precise Previously, the validation was that the port is within the [1, 65535) range. Considering the defined range [17001, 18000) for the random port selector, it makes more sense to check that range instead. --- .../src/org/jetbrains/kotlin/daemon/common/ClientUtils.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/daemon/daemon-common/src/org/jetbrains/kotlin/daemon/common/ClientUtils.kt b/compiler/daemon/daemon-common/src/org/jetbrains/kotlin/daemon/common/ClientUtils.kt index 5e382b1929a..e3f9d231f9d 100644 --- a/compiler/daemon/daemon-common/src/org/jetbrains/kotlin/daemon/common/ClientUtils.kt +++ b/compiler/daemon/daemon-common/src/org/jetbrains/kotlin/daemon/common/ClientUtils.kt @@ -63,7 +63,7 @@ fun walkDaemons( .map { Pair(it, portExtractor(it.name)) } .filter { (file, port) -> port != null && filter(file, port) } .mapNotNull { (file, port) -> - assert(port!! in 1..