mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-05 01:50:56 +07:00
If the frontend receives an event, "stream_closed" with an exception (except for `CancellationException`), it shuts down kernel. This leads to inability to recover after such disconnect. In Fleet thrown `RuntimeException` indicates that something is wrong with a setup because the cancellation order is determined. In the case of Intellij, this exception happens because we cancel only top-level coroutine scope and order of children cancellation is unknown. Instead of closing the channel in `invokeOnCompletion`, it can be closed in finally after subscribed has been canceled. This way we do both: support cancellation from above (intellij case) and ensure there is no out-of-scope subscription (fleet case) GitOrigin-RevId: 3fa7c670bad7a81e404997a1a2d9fb3572c94125