diff options
author | Rickard Green <rickard@erlang.org> | 2023-04-06 16:33:17 +0200 |
---|---|---|
committer | Rickard Green <rickard@erlang.org> | 2023-04-06 16:33:17 +0200 |
commit | c41f3e5825cf5d11e11ab3eeb21e83452aa93d1d (patch) | |
tree | 8a776fd78f6702ffcf9a57c178d33c33d8f3233e | |
parent | bc8e54220a9879ef0284b972e450a4eba007d16d (diff) | |
parent | 38968760804c522e0aa1b82f02834f28d6d24633 (diff) | |
download | erlang-c41f3e5825cf5d11e11ab3eeb21e83452aa93d1d.tar.gz |
Merge branch 'rickard/net_kernel-auto-connect-fix'
* rickard/net_kernel-auto-connect-fix:
[erts] Fix auto connect from net_kernel
-rw-r--r-- | erts/emulator/beam/dist.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/erts/emulator/beam/dist.c b/erts/emulator/beam/dist.c index daf07e5fa7..ca6aa40185 100644 --- a/erts/emulator/beam/dist.c +++ b/erts/emulator/beam/dist.c @@ -5589,6 +5589,9 @@ int erts_auto_connect(DistEntry* dep, Process *proc, ErtsProcLocks proc_locks) return 0; } + if (proc == net_kernel) + nk_locks |= ERTS_PROC_LOCK_MAIN; + /* * Send {auto_connect, Node, DHandle} to net_kernel */ @@ -5599,6 +5602,10 @@ int erts_auto_connect(DistEntry* dep, Process *proc, ErtsProcLocks proc_locks) msg = TUPLE3(hp, am_auto_connect, dep->sysname, dhandle); ERL_MESSAGE_TOKEN(mp) = am_undefined; erts_queue_proc_message(proc, net_kernel, nk_locks, mp, msg); + + if (proc == net_kernel) + nk_locks &= ~ERTS_PROC_LOCK_MAIN; + erts_proc_unlock(net_kernel, nk_locks); } |