diff options
author | Hans Nilsson <[email protected]> | 2018-08-14 18:05:17 +0200 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2018-08-15 12:48:34 +0200 |
commit | e93371b769905e46a579f5117086d47a1181a05e (patch) | |
tree | 2157cd45fe224a10e176ae24c5fb2e7f83b79f21 | |
parent | dacfafd97ed955b9c567f0efbc8553286360b0d2 (diff) | |
download | otp-e93371b769905e46a579f5117086d47a1181a05e.tar.gz otp-e93371b769905e46a579f5117086d47a1181a05e.tar.bz2 otp-e93371b769905e46a579f5117086d47a1181a05e.zip |
ssh: prolong the timeout in ssh_dbg gen_server calls
-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. |