diff options
-rw-r--r-- | lib/observer/src/ttb.erl | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/observer/src/ttb.erl b/lib/observer/src/ttb.erl index a0fbe0d60e..072aa165e7 100644 --- a/lib/observer/src/ttb.erl +++ b/lib/observer/src/ttb.erl @@ -596,6 +596,15 @@ stop(Opts) when is_list(Opts) -> ?MODULE ! {stop,Fetch,self()}, receive {?MODULE,R} -> R end end, + case {Fetch, Result} of + {nofetch, _} -> + ok; + {_, {stopped, _}} -> + %% Printout moved out of the ttb loop to avoid occasional deadlock + io:format("Stored logs in ~s~n", [element(2, Result)]); + {_, _} -> + ok + end, stop_return(Result,Opts); stop(Opts) -> stop([Opts]). @@ -632,8 +641,6 @@ ensure_fetch_dir(Dir) -> stop_return(R,Opts) -> case {lists:member(return_fetch_dir,Opts),R} of {true,_} -> - %%Printout moved out of the ttb loop to avoid occasional deadlock - io:format("Stored logs in ~s~n",[element(2, R)]), R; {false,{stopped,_}} -> stopped; |