diff options
author | Erlang/OTP <[email protected]> | 2017-10-09 15:00:08 +0200 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2017-10-09 15:00:08 +0200 |
commit | 760b3cde56740bd5d4aa5186b59a9b3600f6f7b1 (patch) | |
tree | 1dfafab61ac62749f4bb6a48ae9d382a4db5647b /lib/diameter/src/base/diameter_reg.erl | |
parent | 69292a11cd4b31fd3ff73b44f28d527f2d16f555 (diff) | |
parent | 36e4e948af8c7478dbaf5b2bdd85794f09275d3f (diff) | |
download | otp-760b3cde56740bd5d4aa5186b59a9b3600f6f7b1.tar.gz otp-760b3cde56740bd5d4aa5186b59a9b3600f6f7b1.tar.bz2 otp-760b3cde56740bd5d4aa5186b59a9b3600f6f7b1.zip |
Merge branch 'anders/diameter/reg_monitor/ERIERL-83' into maint-20
* anders/diameter/reg_monitor/ERIERL-83:
Fix missing monitor in diameter_reg
Diffstat (limited to 'lib/diameter/src/base/diameter_reg.erl')
-rw-r--r-- | lib/diameter/src/base/diameter_reg.erl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/diameter/src/base/diameter_reg.erl b/lib/diameter/src/base/diameter_reg.erl index bd5db54a5c..e0c41a2834 100644 --- a/lib/diameter/src/base/diameter_reg.erl +++ b/lib/diameter/src/base/diameter_reg.erl @@ -238,7 +238,11 @@ handle_call({add, Uniq, Key}, {Pid, _}, S) -> Rec = {Key, Pid}, NS = flush(Uniq, Rec, S), %% before insert {Res, New} = insert(Uniq, Rec), - {reply, Res, notify(add, New andalso Rec, NS)}; + {reply, Res, notify(add, New andalso Rec, if New -> + add_monitor(Pid, NS); + true -> + NS + end)}; handle_call({remove, Key}, {Pid, _}, S) -> Rec = {Key, Pid}, |