[rd debugger] Do not compute children when parent scope already cancelled

it caused ClosedSendChannelException in tests

GitOrigin-RevId: 89492bc4af7353c676115eee2a7cb2f37afaa127
This commit is contained in:
Maksim Zuev
2025-10-16 12:59:43 +00:00
committed by intellij-monorepo-bot
parent bc5a8b1a95
commit acb879ca86
@@ -184,7 +184,7 @@ internal fun computeContainerChildren(
return channelFlow {
parentCs.awaitCancellationAndInvoke {
close()
rawEvents.close()
}
val addNextChildrenCallbackHandler = AddNextChildrenCallbackHandler(this@channelFlow)
@@ -224,16 +224,12 @@ internal fun computeContainerChildren(
}
}
launch {
try {
xValueContainer.computeChildren(xCompositeBridgeNode)
for (event in rawEvents) {
send(event.convertToRpcEvent(parentCs, session))
}
}
try {
xValueContainer.computeChildren(xCompositeBridgeNode)
awaitClose()
}
finally {
xCompositeBridgeNode.obsolete = true
}