Skip to content

Commit 4871b35

Browse files
committed
elixir-editors#100 Sets timeout to :infinity for Task.async_stream/3 inside update_state/4 to prevent error when checking for stale beam files
1 parent 5c3bf81 commit 4871b35

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

apps/language_server/lib/language_server/dialyzer.ex

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,14 @@ defmodule ElixirLS.LanguageServer.Dialyzer do
209209
changed = Enum.uniq(new_paths ++ Mix.Utils.extract_stale(all_paths, [timestamp]))
210210

211211
changed_contents =
212-
Task.async_stream(changed, fn file ->
213-
content = File.read!(file)
214-
{file, content, module_md5(file)}
215-
end)
212+
Task.async_stream(
213+
changed,
214+
fn file ->
215+
content = File.read!(file)
216+
{file, content, module_md5(file)}
217+
end,
218+
timeout: :infinity
219+
)
216220
|> Enum.into([])
217221

218222
file_changes =

0 commit comments

Comments
 (0)