diff options
author | Hans Nilsson <[email protected]> | 2018-08-16 16:12:22 +0200 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2018-08-16 16:12:22 +0200 |
commit | 8d8a7f15e5d61a51756be04883beafa3f62b5826 (patch) | |
tree | a1f37f9cdad92437eaf4c4695acc56001def52b1 /lib/ssh/src/ssh_dbg.erl | |
parent | 0d5c75394b24aedbae8bd707f9602386a2e992a3 (diff) | |
parent | e93371b769905e46a579f5117086d47a1181a05e (diff) | |
download | otp-8d8a7f15e5d61a51756be04883beafa3f62b5826.tar.gz otp-8d8a7f15e5d61a51756be04883beafa3f62b5826.tar.bz2 otp-8d8a7f15e5d61a51756be04883beafa3f62b5826.zip |
Merge branch 'hans/ssh/cuddle_tests' into maint
Diffstat (limited to 'lib/ssh/src/ssh_dbg.erl')
-rw-r--r-- | lib/ssh/src/ssh_dbg.erl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/ssh/src/ssh_dbg.erl b/lib/ssh/src/ssh_dbg.erl index 3681e03cc2..4fe15b24d3 100644 --- a/lib/ssh/src/ssh_dbg.erl +++ b/lib/ssh/src/ssh_dbg.erl @@ -77,6 +77,8 @@ -behaviour(gen_server). -define(SERVER, ?MODULE). +-define(CALL_TIMEOUT, 15000). % 3x the default + %%%================================================================ -define(ALL_DBG_TYPES, get_all_dbg_types()). @@ -113,7 +115,7 @@ start_tracer(WriteFun) when is_function(WriteFun,3) -> start_tracer(WriteFun, InitAcc) when is_function(WriteFun, 3) -> Handler = fun(Arg, Acc0) -> - try_all_types_in_all_modules(gen_server:call(?SERVER, get_on), + try_all_types_in_all_modules(gen_server:call(?SERVER, get_on, ?CALL_TIMEOUT), Arg, WriteFun, Acc0) end, @@ -128,7 +130,7 @@ off() -> off(?ALL_DBG_TYPES). % A bit overkill... off(Type) -> switch(off, Type). go_on() -> - IsOn = gen_server:call(?SERVER, get_on), + IsOn = gen_server:call(?SERVER, get_on, ?CALL_TIMEOUT), on(IsOn). %%%---------------------------------------------------------------- @@ -259,7 +261,7 @@ switch(X, Types) when is_list(Types) -> end, case lists:usort(Types) -- ?ALL_DBG_TYPES of [] -> - gen_server:call(?SERVER, {switch,X,Types}); + gen_server:call(?SERVER, {switch,X,Types}, ?CALL_TIMEOUT); L -> {error, {unknown, L}} end. |