[analyzer] bug: rogue cancellation thrown from lsp request of notification handler could destroy the entire server or client

GitOrigin-RevId: 27528e5e0345bd5b3a702fa734c0c597dff8787e
This commit is contained in:
Andrey Zaytsev
2025-10-30 03:19:54 +00:00
committed by intellij-monorepo-bot
parent 530faa43ef
commit 584e4094bd
@@ -211,7 +211,7 @@ suspend fun withLsp(
result
)
}.onFailure { error ->
if (error is CancellationException) throw error
currentCoroutineContext().job.ensureActive()
LOG.error(error)
}.getOrNull()
}
@@ -231,7 +231,7 @@ suspend fun withLsp(
data
)
}.onFailure { decodingError ->
if (decodingError is CancellationException) throw decodingError
currentCoroutineContext().job.ensureActive()
LOG.error(decodingError)
}.getOrNull()
}
@@ -268,7 +268,7 @@ suspend fun withLsp(
}
}
}.onFailure { error ->
if (error is CancellationException) throw error
currentCoroutineContext().job.ensureActive()
LOG.error(error)
}
}