mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[tcp-eel] IJPL-209592: TcpEelMachine: fix endless connections in case of error
GitOrigin-RevId: 840dc02384608fd73a8b8d68e06519cb2ed62214
This commit is contained in:
committed by
intellij-monorepo-bot
parent
bd7bee6d29
commit
22eef74546
@@ -7,6 +7,7 @@ import com.intellij.platform.eel.EelMachine
|
||||
import com.intellij.platform.ijent.IjentApi
|
||||
import com.intellij.platform.ijent.IjentSession
|
||||
import com.intellij.platform.ijent.tcp.IjentIsolatedTcpDeployingStrategy
|
||||
import kotlinx.coroutines.CancellationException
|
||||
import kotlinx.coroutines.CompletableDeferred
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.async
|
||||
@@ -49,7 +50,14 @@ abstract class TcpEelMachine(
|
||||
fun deploy() {
|
||||
if (deployingState.compareAndSet(false, true)) {
|
||||
coroutineScope.async {
|
||||
deferredEelSession.complete(strategyFactory().createIjentSession())
|
||||
try {
|
||||
deferredEelSession.complete(strategyFactory().createIjentSession())
|
||||
}
|
||||
catch (e: Throwable) {
|
||||
deferredEelSession.completeExceptionally(e)
|
||||
|
||||
if (e is CancellationException) throw e
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user