diff options
author | Rickard Green <[email protected]> | 2019-04-15 10:44:17 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2019-04-15 10:44:17 +0200 |
commit | 50e393a06815eedbe9eb3955295f5b1e958f77ee (patch) | |
tree | afa4580409e459be2cbd83243724a2a152a3999e /lib | |
parent | 22726d2e9be3b40d9d727223f7c6d0644d275133 (diff) | |
parent | 8c63320ef787f5748fc8cea64b18bfddb21dc229 (diff) | |
download | otp-50e393a06815eedbe9eb3955295f5b1e958f77ee.tar.gz otp-50e393a06815eedbe9eb3955295f5b1e958f77ee.tar.bz2 otp-50e393a06815eedbe9eb3955295f5b1e958f77ee.zip |
Merge branch 'maint'
* maint:
Add appup and code_change
Fix inadvertently broad monitor
Diffstat (limited to 'lib')
-rw-r--r-- | lib/diameter/src/base/diameter_dist.erl | 12 | ||||
-rw-r--r-- | lib/diameter/src/diameter.appup.src | 6 |
2 files changed, 15 insertions, 3 deletions
diff --git a/lib/diameter/src/base/diameter_dist.erl b/lib/diameter/src/base/diameter_dist.erl index 5c29ea95a4..ed23152b8b 100644 --- a/lib/diameter/src/base/diameter_dist.erl +++ b/lib/diameter/src/base/diameter_dist.erl @@ -454,7 +454,8 @@ start_link() -> init([]) -> ets:new(?NODE_TABLE, [set, named_table]), ets:new(?SERVICE_TABLE, [bag, named_table]), - ok = net_kernel:monitor_nodes(true, [{node_type, all}, nodedown_reason]), + ok = net_kernel:monitor_nodes(true, [{node_type, visible}, + nodedown_reason]), ets:insert(?NODE_TABLE, [{?B(N), N} || N <- [node() | nodes()]]), abcast({attach, node()}), {ok, sets:new()}. @@ -521,5 +522,14 @@ terminate(_, _) -> %% code_change/3 +%% Old code inadvertently monitored all nodes: start a new +%% subscription and remove the old one. +code_change(_OldVsn, State, "2.2") -> + ok = net_kernel:monitor_nodes(true, [{node_type, visible}, + nodedown_reason]), + ok = net_kernel:monitor_nodes(false, [{node_type, all}, + nodedown_reason]), + {ok, State}; + code_change(_OldVsn, State, _Extra) -> {ok, State}. diff --git a/lib/diameter/src/diameter.appup.src b/lib/diameter/src/diameter.appup.src index 52263633fb..bb2a4a8e92 100644 --- a/lib/diameter/src/diameter.appup.src +++ b/lib/diameter/src/diameter.appup.src @@ -61,7 +61,8 @@ {"2.1.4", [{restart_application, diameter}]}, %% 20.3 {"2.1.4.1", [{restart_application, diameter}]}, %% 20.3.8.19 {"2.1.5", [{restart_application, diameter}]}, %% 21.0 - {"2.1.6", [{restart_application, diameter}]} %% 21.1 + {"2.1.6", [{restart_application, diameter}]}, %% 21.1 + {"2.2", [{update, diameter_dist, {advanced, "2.2"}}]} %% 21.3 ], [ {"0.9", [{restart_application, diameter}]}, @@ -104,6 +105,7 @@ {"2.1.4", [{restart_application, diameter}]}, {"2.1.4.1", [{restart_application, diameter}]}, {"2.1.5", [{restart_application, diameter}]}, - {"2.1.6", [{restart_application, diameter}]} + {"2.1.6", [{restart_application, diameter}]}, + {"2.2", [{restart_application, diameter}]} ] }. |