diff --git a/lib/gen_lsp.ex b/lib/gen_lsp.ex index 6c46dba..0762dcc 100644 --- a/lib/gen_lsp.ex +++ b/lib/gen_lsp.ex @@ -67,8 +67,9 @@ defmodule GenLSP do id: __MODULE__, start: {__MODULE__, :start_link, [opts]}, type: :worker, - restart: :permanent, - shutdown: 500 + restart: :temporary, + shutdown: 500, + significant: true } end diff --git a/lib/gen_lsp/buffer.ex b/lib/gen_lsp/buffer.ex index d22c077..35bc3e6 100644 --- a/lib/gen_lsp/buffer.ex +++ b/lib/gen_lsp/buffer.ex @@ -2,7 +2,7 @@ defmodule GenLSP.Buffer do @moduledoc """ The data buffer between the LSP process and the communication channel. """ - use GenServer + use GenServer, restart: :temporary, significant: true require Logger diff --git a/lib/gen_lsp/test.ex b/lib/gen_lsp/test.ex index 76078fb..4863b7c 100644 --- a/lib/gen_lsp/test.ex +++ b/lib/gen_lsp/test.ex @@ -47,7 +47,9 @@ defmodule GenLSP.Test do buffer = start_supervised!({GenLSP.Buffer, communication: {GenLSP.Communication.TCP, [port: 0]}}, - id: buffer_id + id: buffer_id, + # The test supervisor only supports auto_shutdown: :never, so we override it to avoid conflicts + significant: false ) assigns = start_supervised!(GenLSP.Assigns, id: assigns_id) @@ -61,7 +63,9 @@ defmodule GenLSP.Test do start_supervised!( {mod, Keyword.merge([buffer: buffer, assigns: assigns, task_supervisor: task_supervisor], opts)}, - id: lsp_id + id: lsp_id, + # The test supervisor only supports auto_shutdown: :never, so we override it to avoid conflicts + significant: false ) %{