aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/src/ct_logs.erl
diff options
context:
space:
mode:
authorZandra Hird <[email protected]>2016-06-10 09:58:48 +0200
committerZandra Hird <[email protected]>2016-06-10 09:58:48 +0200
commit51f4f2c08082bfed4243ff92f23cac936d22efdb (patch)
tree5e0833a93267ef7b42809e5eaa52abed55407519 /lib/common_test/src/ct_logs.erl
parent57cb0089f34aaf55e60e80872de1e58af3105cac (diff)
parente65fed9a0a10c9c308dcc71ec025c10293c68928 (diff)
downloadotp-51f4f2c08082bfed4243ff92f23cac936d22efdb.tar.gz
otp-51f4f2c08082bfed4243ff92f23cac936d22efdb.tar.bz2
otp-51f4f2c08082bfed4243ff92f23cac936d22efdb.zip
Merge branch 'zandra/common_test/fix-ct_logs-crash-bug'
* zandra/common_test/fix-ct_logs-crash-bug: Avoid crash when monitored ct_logs process is not responding
Diffstat (limited to 'lib/common_test/src/ct_logs.erl')
-rw-r--r--lib/common_test/src/ct_logs.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/common_test/src/ct_logs.erl b/lib/common_test/src/ct_logs.erl
index 455864efb6..53245c596a 100644
--- a/lib/common_test/src/ct_logs.erl
+++ b/lib/common_test/src/ct_logs.erl
@@ -137,7 +137,8 @@ close(Info, StartDir) ->
%% so we need to use a local copy of the log cache data
LogCacheBin =
case make_last_run_index() of
- {error,_} -> % log server not responding
+ {error, Reason} -> % log server not responding
+ io:format("Warning! ct_logs not responding: ~p~n", [Reason]),
undefined;
LCB ->
LCB
@@ -240,7 +241,7 @@ call(Msg) ->
Pid ->
MRef = erlang:monitor(process,Pid),
Ref = make_ref(),
- ?MODULE ! {Msg,{self(),Ref}},
+ Pid ! {Msg,{self(),Ref}},
receive
{Ref, Result} ->
erlang:demonitor(MRef, [flush]),