Fix calculation of Kotlin Daemon alive timeout
#KT-48779 Fixed
diff --git a/compiler/daemon/src/org/jetbrains/kotlin/daemon/CompileServiceImpl.kt b/compiler/daemon/src/org/jetbrains/kotlin/daemon/CompileServiceImpl.kt
index e0c0611..e94b4cb 100644
--- a/compiler/daemon/src/org/jetbrains/kotlin/daemon/CompileServiceImpl.kt
+++ b/compiler/daemon/src/org/jetbrains/kotlin/daemon/CompileServiceImpl.kt
@@ -801,18 +801,21 @@
compilationOptions: CompilationOptions,
servicesFacade: CompilerServicesFacadeBase,
compilationResults: CompilationResults?
- ) = compileImpl(
- sessionId,
- compilerArguments,
- compilationOptions,
- servicesFacade,
- compilationResults,
- hasIncrementalCaches = JpsCompilerServicesFacade::hasIncrementalCaches,
- createMessageCollector = ::CompileServicesFacadeMessageCollector,
- createReporter = ::DaemonMessageReporter,
- createServices = this::createCompileServices,
- getICReporter = { a, b, c -> getBuildReporter(a, b!!, c)}
- )
+ ) = ifAlive {
+ compileImpl(
+ sessionId,
+ compilerArguments,
+ compilationOptions,
+ servicesFacade,
+ compilationResults,
+ hasIncrementalCaches = JpsCompilerServicesFacade::hasIncrementalCaches,
+ createMessageCollector = ::CompileServicesFacadeMessageCollector,
+ createReporter = ::DaemonMessageReporter,
+ createServices = this::createCompileServices,
+ getICReporter = { a, b, c -> getBuildReporter(a, b!!, c)}
+ )
+ }
+
@Deprecated("The usages should be replaced with other `leaseReplSession` method", ReplaceWith("leaseReplSession"))
override fun leaseReplSession(