aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2018-08-16 16:13:53 +0200
committerHans Nilsson <[email protected]>2018-08-16 16:13:53 +0200
commitaa98242ff41a27cea275e5f1ec7919b3ad959046 (patch)
treed03f7f05b3651fa7933fb232c4c1d35084e2e4d6 /lib
parentfc99e2824d418dd9feb2f7f3382ae87bcc307792 (diff)
parent8d8a7f15e5d61a51756be04883beafa3f62b5826 (diff)
downloadotp-aa98242ff41a27cea275e5f1ec7919b3ad959046.tar.gz
otp-aa98242ff41a27cea275e5f1ec7919b3ad959046.tar.bz2
otp-aa98242ff41a27cea275e5f1ec7919b3ad959046.zip
Merge branch 'maint'
* maint: ssh: prolong the timeout in ssh_dbg gen_server calls
Diffstat (limited to 'lib')
-rw-r--r--lib/ssh/src/ssh_dbg.erl8
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.