diff options
author | Hans Nilsson <[email protected]> | 2017-11-16 14:59:14 +0100 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2017-11-16 14:59:14 +0100 |
commit | 4c736d27d32b5334d8ba978c100a591caf0ac604 (patch) | |
tree | 6cf3c6851886ca67449f785fe726686cfb7e3305 /erts/emulator | |
parent | 12e3758d65c6fc6d42642fb7d4f59ac9f10081f6 (diff) | |
parent | e87edf7268a646db94a3d8be7b782032390380d1 (diff) | |
download | otp-4c736d27d32b5334d8ba978c100a591caf0ac604.tar.gz otp-4c736d27d32b5334d8ba978c100a591caf0ac604.tar.bz2 otp-4c736d27d32b5334d8ba978c100a591caf0ac604.zip |
Merge branch 'maint' of github.com:erlang/otp into maint
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 09fdb897f5..9fddac8980 100644 --- a/erts/emulator/beam/dist.c +++ b/erts/emulator/beam/dist.c @@ -385,22 +385,24 @@ static void doit_node_link_net_exits(ErtsLink *lnk, void *vnecp) if (!rp) goto done; erts_smp_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_smp_proc_unlock(rp, rp_locks); } done: |