diff --git a/platform/xdebugger-impl/backend/src/com/intellij/platform/debugger/impl/backend/BackendXValueApi.kt b/platform/xdebugger-impl/backend/src/com/intellij/platform/debugger/impl/backend/BackendXValueApi.kt index db02624f2363..b5403261d7ac 100644 --- a/platform/xdebugger-impl/backend/src/com/intellij/platform/debugger/impl/backend/BackendXValueApi.kt +++ b/platform/xdebugger-impl/backend/src/com/intellij/platform/debugger/impl/backend/BackendXValueApi.kt @@ -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 }