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 b615c84 commit 6ecb430Copy full SHA for 6ecb430
lib/iex/lib/iex/mix_listener.ex
@@ -12,10 +12,18 @@ defmodule IEx.MixListener do
12
13
@doc """
14
Unloads all modules invalidated by external compilations.
15
+
16
+ Returns `:noop` if there is no module to purge or if
17
+ the listener is not running (it may happen when connecting
18
+ via --remsh to a node that was started without IEx).
19
"""
20
@spec purge :: :ok | :noop
21
def purge do
- GenServer.call(@name, :purge, :infinity)
22
+ if Process.whereis(@name) do
23
+ GenServer.call(@name, :purge, :infinity)
24
+ else
25
+ :noop
26
+ end
27
end
28
29
@impl true
0 commit comments