We were letting the CancellationError bubble up all the way until
it terminated app, which meant we didn't hit the shutdown code
in run(), stopping the VM and the network.
We now catch CancellationError and proceed to gracefully shut down.
We only stop the VM if it's still running, as a VM that has been
stopped via the menu can't be stopped again.
We were letting the CancellationError bubble up all the way until it terminated app, which meant we didn't hit the shutdown code in run(), stopping the VM and the network.
We now catch CancellationError and proceed to gracefully shut down.
We only stop the VM if it's still running, as a VM that has been stopped via the menu can't be stopped again.