aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/src/base/diameter_watchdog.erl
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2015-07-08 13:42:37 +0200
committerAnders Svensson <[email protected]>2015-08-04 17:33:37 +0200
commit4c1e79bf4582e19cd7b4225fb867b4f088895294 (patch)
tree0752a58780f7ec274e5419aa2bc625b2ba27a800 /lib/diameter/src/base/diameter_watchdog.erl
parentf3fefbae24a2569a13b538d80d0e99129963ebef (diff)
downloadotp-4c1e79bf4582e19cd7b4225fb867b4f088895294.tar.gz
otp-4c1e79bf4582e19cd7b4225fb867b4f088895294.tar.bz2
otp-4c1e79bf4582e19cd7b4225fb867b4f088895294.zip
Truncate potentially large terms passed to diameter_lib:log/4
Last visited in commit 00584303.
Diffstat (limited to 'lib/diameter/src/base/diameter_watchdog.erl')
-rw-r--r--lib/diameter/src/base/diameter_watchdog.erl7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/diameter/src/base/diameter_watchdog.erl b/lib/diameter/src/base/diameter_watchdog.erl
index de9c4bca33..55c303dec2 100644
--- a/lib/diameter/src/base/diameter_watchdog.erl
+++ b/lib/diameter/src/base/diameter_watchdog.erl
@@ -245,11 +245,16 @@ handle_info(T, #watchdog{} = State) ->
event(T, State, S), %% before 'watchdog'
{noreply, S};
stop ->
- ?LOG(stop, T),
+ ?LOG(stop, truncate(T)),
event(T, State, State#watchdog{status = down}),
{stop, {shutdown, T}, State}
end.
+truncate({'DOWN' = T, _, process, Pid, _}) ->
+ {T, Pid};
+truncate(T) ->
+ T.
+
close({'DOWN', _, process, TPid, {shutdown, Reason}},
#watchdog{transport = TPid,
parent = Pid}) ->