aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/src/base/diameter_service.erl
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2012-08-22 16:45:31 +0200
committerAnders Svensson <[email protected]>2012-08-24 19:01:47 +0200
commitb1cdee0b11c6fde89ba586b1c04724daf4a96a07 (patch)
treeb8792510c06709e6d6f1c53c3584717e0e73f67a /lib/diameter/src/base/diameter_service.erl
parentcfea5eea406ba3af96588ff458e55de9a149d9c5 (diff)
downloadotp-b1cdee0b11c6fde89ba586b1c04724daf4a96a07.tar.gz
otp-b1cdee0b11c6fde89ba586b1c04724daf4a96a07.tar.bz2
otp-b1cdee0b11c6fde89ba586b1c04724daf4a96a07.zip
Add events for watchdog state transitions
Diffstat (limited to 'lib/diameter/src/base/diameter_service.erl')
-rw-r--r--lib/diameter/src/base/diameter_service.erl8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/diameter/src/base/diameter_service.erl b/lib/diameter/src/base/diameter_service.erl
index 3dfdcee2b2..c9c3179630 100644
--- a/lib/diameter/src/base/diameter_service.erl
+++ b/lib/diameter/src/base/diameter_service.erl
@@ -516,6 +516,14 @@ transition({reconnect, Pid}, S) ->
reconnect(Pid, S),
ok;
+%% Watchdog is sending notification of a state transition.
+transition({watchdog, Pid, {TPid, From, To}}, #state{service_name = SvcName,
+ peerT = PeerT}) ->
+ #peer{ref = Ref, type = T, options = Opts}
+ = fetch(PeerT, Pid),
+ send_event(SvcName, {watchdog, Ref, TPid, {From, To}, {T, Opts}}),
+ ok;
+
%% Monitor process has died. Just die with a reason that tells
%% diameter_config about the happening. If a cleaner shutdown is
%% required then someone should stop us.