We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e45a1f2 commit 34997a2Copy full SHA for 34997a2
lib/iex/lib/iex/mix_listener.ex
@@ -15,10 +15,18 @@ defmodule IEx.MixListener do
15
16
@doc """
17
Unloads all modules invalidated by external compilations.
18
+
19
+ Returns `:noop` if there is no module to purge or if
20
+ the listener is not running (it may happen when connecting
21
+ via --remsh to a node that was started without IEx).
22
"""
23
@spec purge :: :ok | :noop
24
def purge do
- GenServer.call(@name, :purge, :infinity)
25
+ if Process.whereis(@name) do
26
+ GenServer.call(@name, :purge, :infinity)
27
+ else
28
+ :noop
29
+ end
30
end
31
32
@impl true
0 commit comments