diff options
author | Rickard Green <[email protected]> | 2017-11-16 14:09:05 +0100 |
---|---|---|
committer | Rickard Green <[email protected]> | 2017-11-16 14:09:05 +0100 |
commit | 7e9496857bed3c34749fa3717f79df0e01cba465 (patch) | |
tree | c467d82d696c0c1ce03111a9c01e9ae2ca8edff7 /erts/emulator | |
parent | 68dd05500dcad280417a2479f32fb6f7894ae712 (diff) | |
parent | aa449ea20952d6a4d71718bac0b1be6dd45d8201 (diff) | |
download | otp-7e9496857bed3c34749fa3717f79df0e01cba465.tar.gz otp-7e9496857bed3c34749fa3717f79df0e01cba465.tar.bz2 otp-7e9496857bed3c34749fa3717f79df0e01cba465.zip |
Merge branch 'maint'
* maint:
Fix triggering of node monitors
Conflicts:
erts/emulator/beam/dist.c
Diffstat (limited to 'erts/emulator')
-rw-r--r-- | erts/emulator/beam/dist.c | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/erts/emulator/beam/dist.c b/erts/emulator/beam/dist.c index bc168fc58d..e6e4221c08 100644 --- a/erts/emulator/beam/dist.c +++ b/erts/emulator/beam/dist.c @@ -383,22 +383,24 @@ static void doit_node_link_net_exits(ErtsLink *lnk, void *vnecp) if (!rp) goto done; erts_proc_lock(rp, rp_locks); - rlnk = erts_remove_link(&ERTS_P_LINKS(rp), name); - if (rlnk != NULL) { - ASSERT(is_atom(rlnk->pid) && (rlnk->type == LINK_NODE)); - erts_destroy_link(rlnk); - } - n = ERTS_LINK_REFC(lnk); - for (i = 0; i < n; ++i) { - Eterm tup; - Eterm *hp; - ErtsMessage *msgp; - - msgp = erts_alloc_message_heap(rp, &rp_locks, - 3, &hp, &ohp); - tup = TUPLE2(hp, am_nodedown, name); - erts_queue_message(rp, rp_locks, msgp, tup, am_system); - } + if (!ERTS_PROC_IS_EXITING(rp)) { + rlnk = erts_remove_link(&ERTS_P_LINKS(rp), name); + if (rlnk != NULL) { + ASSERT(is_atom(rlnk->pid) && (rlnk->type == LINK_NODE)); + erts_destroy_link(rlnk); + } + n = ERTS_LINK_REFC(lnk); + for (i = 0; i < n; ++i) { + Eterm tup; + Eterm *hp; + ErtsMessage *msgp; + + msgp = erts_alloc_message_heap(rp, &rp_locks, + 3, &hp, &ohp); + tup = TUPLE2(hp, am_nodedown, name); + erts_queue_message(rp, rp_locks, msgp, tup, am_system); + } + } erts_proc_unlock(rp, rp_locks); } done: |