File 1379-erts-Fix-bug-in-erlang-monitor_node-for-rare-reconne.patch of Package erlang

From 5c62b5544cf5807da66075299f8b06591d139573 Mon Sep 17 00:00:00 2001
From: Sverker Eriksson <sverker@erlang.org>
Date: Thu, 18 Dec 2025 17:04:19 +0100
Subject: [PATCH] erts: Fix bug in erlang:monitor_node for rare reconnect case

---
 erts/emulator/beam/dist.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/erts/emulator/beam/dist.c b/erts/emulator/beam/dist.c
index e33b354090..a409b3d5a7 100644
--- a/erts/emulator/beam/dist.c
+++ b/erts/emulator/beam/dist.c
@@ -6443,7 +6443,7 @@ monitor_node(Process* p, Eterm Node, Eterm Bool, Eterm Options)
                                              THE_NON_VALUE));
                 mon2 = &mdep2->md.origin;
                 inserted =
-                    erts_monitor_dist_insert(&mdep->md.u.target, dep->mld);
+                    erts_monitor_dist_insert(&mdep2->md.u.target, dep->mld);
                 ASSERT(inserted); (void)inserted;
                 ASSERT(mdep2->dist->connection_id == dep->connection_id);
 
-- 
2.51.0

openSUSE Build Service is sponsored by