diff options
author | Siri Hansen <[email protected]> | 2013-03-26 14:40:36 +0100 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2013-03-26 14:40:36 +0100 |
commit | 42c31ab4bfcd74d7139f90ea1b03a35048cacef6 (patch) | |
tree | d418d472a9ca16f76d5b5d6cb2caa22ef3de284b /lib/tools/src | |
parent | 61613acb659553004538ad13ded3d6bf343bf6a7 (diff) | |
download | otp-42c31ab4bfcd74d7139f90ea1b03a35048cacef6.tar.gz otp-42c31ab4bfcd74d7139f90ea1b03a35048cacef6.tar.bz2 otp-42c31ab4bfcd74d7139f90ea1b03a35048cacef6.zip |
[cover] Ensure no process leak when stopping cover on dead node
When cover:stop(Node) was called on a non-existing node, a process
waiting for cover data from the node would hang forever. This has been
corrected.
Diffstat (limited to 'lib/tools/src')
-rw-r--r-- | lib/tools/src/cover.erl | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/tools/src/cover.erl b/lib/tools/src/cover.erl index dfcfc3675f..c2c627abe0 100644 --- a/lib/tools/src/cover.erl +++ b/lib/tools/src/cover.erl @@ -1139,9 +1139,14 @@ remote_collect(Module,Nodes,Stop) -> do_collection(Node, Module, Stop) -> CollectorPid = spawn(fun collector_proc/0), - remote_call(Node,{remote,collect,Module,CollectorPid, self()}), - if Stop -> remote_call(Node,{remote,stop}); - true -> ok + case remote_call(Node,{remote,collect,Module,CollectorPid, self()}) of + {error,node_dead} -> + CollectorPid ! done, + ok; + ok when Stop -> + remote_call(Node,{remote,stop}); + ok -> + ok end. %% Process which receives chunks of data from remote nodes - either when |