aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/src/base/diameter_watchdog.erl
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2013-01-24 16:16:05 +0100
committerAnders Svensson <[email protected]>2013-02-08 15:28:56 +0100
commit34b008c323591b0c02f42287c86b9a788aab51ad (patch)
tree566c448d20c5cf0216d1c445b5189019a2ab4c9a /lib/diameter/src/base/diameter_watchdog.erl
parent74755d8d18aa1769840b0914fe73e9c5c4b3219b (diff)
downloadotp-34b008c323591b0c02f42287c86b9a788aab51ad.tar.gz
otp-34b008c323591b0c02f42287c86b9a788aab51ad.tar.bz2
otp-34b008c323591b0c02f42287c86b9a788aab51ad.zip
Simplify transport shutdown
Service process informs the watchdog process which informs the peer process. (Instead of going directly to the latter in one case.)
Diffstat (limited to 'lib/diameter/src/base/diameter_watchdog.erl')
-rw-r--r--lib/diameter/src/base/diameter_watchdog.erl16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/diameter/src/base/diameter_watchdog.erl b/lib/diameter/src/base/diameter_watchdog.erl
index ad4a142f76..49b6776a84 100644
--- a/lib/diameter/src/base/diameter_watchdog.erl
+++ b/lib/diameter/src/base/diameter_watchdog.erl
@@ -208,15 +208,15 @@ transition(close, #watchdog{}) ->
ok;
%% Service is asking for the peer to be taken down gracefully.
-transition({shutdown, Pid}, #watchdog{parent = Pid,
- transport = undefined,
- status = S}) ->
- down = S, %% sanity check
+transition({shutdown, Pid, _}, #watchdog{parent = Pid,
+ transport = undefined,
+ status = S}) ->
+ down = S, %% assert
stop;
-transition({shutdown = T, Pid}, #watchdog{parent = Pid,
- transport = TPid}
- = S) ->
- TPid ! {T, self()},
+transition({shutdown = T, Pid, Reason}, #watchdog{parent = Pid,
+ transport = TPid}
+ = S) ->
+ TPid ! {T, self(), Reason},
S#watchdog{shutdown = true};
%% Parent process has died,