From 3a3e91b3592c911fc251c496421135a1a116fa00 Mon Sep 17 00:00:00 2001 From: Anders Svensson Date: Mon, 7 Sep 2015 16:57:30 +0200 Subject: 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}. --- lib/diameter/src/base/diameter_watchdog.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/diameter/src') 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)}. -- cgit v1.2.3