aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/src
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2019-04-14 13:05:50 +0200
committerAnders Svensson <[email protected]>2019-04-14 15:33:06 +0200
commit37df105ad012683de1de4a1db40818dde9c7f3bd (patch)
tree1ac0f82fd03fcb198f8a1f007eb9d2bc0b37b916 /lib/diameter/src
parent620ac3e68c5bc8b36143965fcf2892a07dc005c4 (diff)
downloadotp-37df105ad012683de1de4a1db40818dde9c7f3bd.tar.gz
otp-37df105ad012683de1de4a1db40818dde9c7f3bd.tar.bz2
otp-37df105ad012683de1de4a1db40818dde9c7f3bd.zip
Fix inadvertently broad monitor
Commit d9d918b2 added a gen_server whose purpose is to keep track of visible nodes on which diameter_dist:attach/1 has been called to register a node as a handler of incoming Diameter requests when diameter_dist:route_session/2 is configured as spawn_opt MFA. The server contacts visible nodes at init in order to request information, but instead of monitoring visible to also be able to request information at nodeup, it monitored on all nodes, resulting in gen_server casts even to hidden nodes. Monitor only on visible nodes since a hidden node may not be able to deal with the new message.
Diffstat (limited to 'lib/diameter/src')
-rw-r--r--lib/diameter/src/base/diameter_dist.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/diameter/src/base/diameter_dist.erl b/lib/diameter/src/base/diameter_dist.erl
index 5c29ea95a4..963db71260 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()}.