diff options
author | Anders Svensson <[email protected]> | 2015-09-07 16:57:30 +0200 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2015-09-07 17:41:02 +0200 |
commit | 3a3e91b3592c911fc251c496421135a1a116fa00 (patch) | |
tree | d7905015b75f8eab345fd7438eb54a2f8e16e5ea /lib/diameter/src/base/diameter_watchdog.erl | |
parent | 502189ba42469d3332bc0658caa2bd0de1e3fcb9 (diff) | |
download | otp-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/diameter_watchdog.erl')
-rw-r--r-- | lib/diameter/src/base/diameter_watchdog.erl | 8 |
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)}. |