Skip to content

Commit

Permalink
Merge branch 'rickard/net_kernel-auto-connect-fix'
Browse files Browse the repository at this point in the history
* rickard/net_kernel-auto-connect-fix:
  [erts] Fix auto connect from net_kernel
  • Loading branch information
rickard-green committed Apr 6, 2023
2 parents bc8e542 + 3896876 commit c41f3e5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions erts/emulator/beam/dist.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand All @@ -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);
}

Expand Down

0 comments on commit c41f3e5

Please sign in to comment.