aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/src/base/diameter_watchdog.erl
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2012-10-09 11:03:25 +0200
committerAnders Svensson <[email protected]>2012-11-05 11:53:45 +0100
commitc14ef2dbd4e0e259fc401acce2ee43dc9fd4f4f9 (patch)
tree60a320bfb3c1053da4461365c10b1bf6b06a94d0 /lib/diameter/src/base/diameter_watchdog.erl
parent0184ed7e1cfaf39d31b997b9b7c3a2a02ee4b4ea (diff)
downloadotp-c14ef2dbd4e0e259fc401acce2ee43dc9fd4f4f9.tar.gz
otp-c14ef2dbd4e0e259fc401acce2ee43dc9fd4f4f9.tar.bz2
otp-c14ef2dbd4e0e259fc401acce2ee43dc9fd4f4f9.zip
Add reopen message from watchdog
This makes capabilities available to service_info as soon as capabilities exchange has been completed. In particular, before state OKAY is reached.
Diffstat (limited to 'lib/diameter/src/base/diameter_watchdog.erl')
-rw-r--r--lib/diameter/src/base/diameter_watchdog.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/diameter/src/base/diameter_watchdog.erl b/lib/diameter/src/base/diameter_watchdog.erl
index 1045d9ad9f..b37a1a10e9 100644
--- a/lib/diameter/src/base/diameter_watchdog.erl
+++ b/lib/diameter/src/base/diameter_watchdog.erl
@@ -272,12 +272,15 @@ transition({open, TPid, Hosts, T} = Open,
transition({open = P, TPid, _Hosts, T},
#watchdog{transport = TPid,
+ parent = Pid,
status = down}
= S) ->
%% Store the info we need to notify the parent to reopen the
%% connection after the requisite DWA's are received, at which
- %% time we eraser(open).
+ %% time we eraser(open). The reopen message is a later addition,
+ %% to communicate the new capabilities as soon as they're known.
putr(P, {TPid, T}),
+ Pid ! {reopen, self(), {TPid, T}},
set_watchdog(send_watchdog(S#watchdog{status = reopen,
num_dwa = 0}));