diff options
author | Kelly McLaughlin <[email protected]> | 2010-09-02 08:39:37 -0600 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2010-09-06 14:25:16 +0200 |
commit | a9f4cbcbc02b38f00bde3fa9ac7456702ac7675e (patch) | |
tree | 8a30b68d28ba1160126b6a0b18443852adca6b61 /lib | |
parent | 053e1b6a47536509a43a9ba667df967340349fa3 (diff) | |
download | otp-a9f4cbcbc02b38f00bde3fa9ac7456702ac7675e.tar.gz otp-a9f4cbcbc02b38f00bde3fa9ac7456702ac7675e.tar.bz2 otp-a9f4cbcbc02b38f00bde3fa9ac7456702ac7675e.zip |
Change pool module to attempt to attach to nodes that are already running
The pool module prints out an error message and takes no
further action for nodes that are already running. This
patch changes that behavior so that if the return from
slave:start/3 is {already_running, Node} then an attempt
to attach to the node is still made. This makes sense
because the node has been specified by the user in the
.hosts.erlang file indicating a wish for the node to
be part of the pool and a manual attach can be
successfully made after the pool is started.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/stdlib/src/pool.erl | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/stdlib/src/pool.erl b/lib/stdlib/src/pool.erl index 7f5f23e26d..a3c9927ee9 100644 --- a/lib/stdlib/src/pool.erl +++ b/lib/stdlib/src/pool.erl @@ -95,6 +95,9 @@ pspawn_link(M, F, A) -> start_nodes([], _, _) -> []; start_nodes([Host|Tail], Name, Args) -> case slave:start(Host, Name, Args) of + {error, {already_running, Node}} -> + io:format("Can't start node on host ~w due to ~w~n",[Host, {already_running, Node}]), + [Node | start_nodes(Tail, Name, Args)]; {error, R} -> io:format("Can't start node on host ~w due to ~w~n",[Host, R]), start_nodes(Tail, Name, Args); |