aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2019-06-17 11:17:04 +0200
committerRickard Green <[email protected]>2019-06-17 11:17:04 +0200
commit8e60fe7df9fa2ceaa4636495a9b75d495dc336e9 (patch)
treec45a084ee9acf44be4c453e9b7d3007d89666fea
parentdb6059a9217767a6e42e93cec05089c0ec977d20 (diff)
downloadotp-8e60fe7df9fa2ceaa4636495a9b75d495dc336e9.tar.gz
otp-8e60fe7df9fa2ceaa4636495a9b75d495dc336e9.tar.bz2
otp-8e60fe7df9fa2ceaa4636495a9b75d495dc336e9.zip
Don't disconnect on remote exit/2 with old incarnation as recipient
-rw-r--r--erts/emulator/beam/dist.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/erts/emulator/beam/dist.c b/erts/emulator/beam/dist.c
index 9fddac8980..26352e5534 100644
--- a/erts/emulator/beam/dist.c
+++ b/erts/emulator/beam/dist.c
@@ -1668,9 +1668,17 @@ int erts_net_message(Port *prt,
token = tuple[4];
reason = tuple[5];
}
- if (is_not_pid(from) || is_not_internal_pid(to)) {
+ if (is_not_pid(from)) {
goto invalid_message;
}
+ if (is_not_internal_pid(to)) {
+ if (is_external_pid(to)) {
+ DistEntry *dep = external_pid_dist_entry(to);
+ if (dep == erts_this_dist_entry)
+ break; /* Old incarnation of this node... */
+ }
+ goto invalid_message;
+ }
rp = erts_pid2proc(NULL, 0, to, rp_locks);
if (rp) {
(void) erts_send_exit_signal(NULL,