aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/src/base
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2015-09-07 16:57:30 +0200
committerAnders Svensson <[email protected]>2015-09-07 17:41:02 +0200
commit3a3e91b3592c911fc251c496421135a1a116fa00 (patch)
treed7905015b75f8eab345fd7438eb54a2f8e16e5ea /lib/diameter/src/base
parent502189ba42469d3332bc0658caa2bd0de1e3fcb9 (diff)
downloadotp-3a3e91b3592c911fc251c496421135a1a116fa00.tar.gz
otp-3a3e91b3592c911fc251c496421135a1a116fa00.tar.bz2
otp-3a3e91b3592c911fc251c496421135a1a116fa00.zip
Fix watchdog function_clause
Commit 4f365c07 introduced the error on set_watchdog/2, as a consequence of timeout/1 returning stop, which only happens with accepting transports with {restrict_connections, false}.
Diffstat (limited to 'lib/diameter/src/base')
-rw-r--r--lib/diameter/src/base/diameter_watchdog.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/diameter/src/base/diameter_watchdog.erl b/lib/diameter/src/base/diameter_watchdog.erl
index 885dc6c801..26bca7a5bc 100644
--- a/lib/diameter/src/base/diameter_watchdog.erl
+++ b/lib/diameter/src/base/diameter_watchdog.erl
@@ -539,13 +539,13 @@ set_watchdog(#watchdog{tref = undefined} = S) ->
%% Timer already set: start at new one only at expiry.
set_watchdog(#watchdog{} = S) ->
- S#watchdog{tref = now()};
-
-set_watchdog(stop = No) ->
- No.
+ S#watchdog{tref = now()}.
%% set_watchdog/2
+set_watchdog(_, stop = No) ->
+ No;
+
set_watchdog(Ms, #watchdog{tw = TwInit} = S) ->
S#watchdog{tref = erlang:start_timer(tw(TwInit, Ms), self(), tw)}.