From de7552a99b452da782a087dda35b1072fa021421 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonatan=20K=C5=82osko?= Date: Thu, 19 Sep 2024 17:24:21 +0700 Subject: [PATCH] Do not crash when disconnecting runtime on unreachable node --- lib/livebook/runtime/erl_dist/runtime_server.ex | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/livebook/runtime/erl_dist/runtime_server.ex b/lib/livebook/runtime/erl_dist/runtime_server.ex index 7a7da52a4..5377ca2f6 100644 --- a/lib/livebook/runtime/erl_dist/runtime_server.ex +++ b/lib/livebook/runtime/erl_dist/runtime_server.ex @@ -330,6 +330,9 @@ defmodule Livebook.Runtime.ErlDist.RuntimeServer do @spec stop(pid()) :: :ok def stop(pid) do GenServer.stop(pid) + catch + # Gracefully handle lost connection to a remote node + :exit, _ -> :ok end @impl true