diff options
author | Siri Hansen <[email protected]> | 2012-12-18 18:19:29 +0100 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2012-12-19 12:24:38 +0100 |
commit | c89f88ab3ec77ebc1cef180e1ae5c9917b4c7b06 (patch) | |
tree | 9deaefcc2602d2c03e2eb7a0eedeb6c82ec37e02 /lib/tools/src/cover.erl | |
parent | 955d2f9dad5cedc25afb8dd7893f697f4f6f26a9 (diff) | |
download | otp-c89f88ab3ec77ebc1cef180e1ae5c9917b4c7b06.tar.gz otp-c89f88ab3ec77ebc1cef180e1ae5c9917b4c7b06.tar.bz2 otp-c89f88ab3ec77ebc1cef180e1ae5c9917b4c7b06.zip |
[cover] Don't mark stopped node as lost
Nodes that were stopped with cover:stop/1 were marked as lost and
would be reconnected if a nodeup was later received for a node with
the same name. This has been corrected.
Diffstat (limited to 'lib/tools/src/cover.erl')
-rw-r--r-- | lib/tools/src/cover.erl | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/tools/src/cover.erl b/lib/tools/src/cover.erl index 10f14b0a49..e51763b6ee 100644 --- a/lib/tools/src/cover.erl +++ b/lib/tools/src/cover.erl @@ -792,8 +792,15 @@ main_process_loop(State) -> {'DOWN', _MRef, process, {?SERVER,Node}, _Info} -> %% A remote cover_server is down, mark as lost - Nodes = State#main_state.nodes--[Node], - Lost = [Node|State#main_state.lost_nodes], + {Nodes,Lost} = + case lists:member(Node,State#main_state.nodes) of + true -> + N = State#main_state.nodes--[Node], + L = [Node|State#main_state.lost_nodes], + {N,L}; + false -> % node stopped + {State#main_state.nodes,State#main_state.lost_nodes} + end, main_process_loop(State#main_state{nodes=Nodes,lost_nodes=Lost}); {nodeup,Node} -> |