Skip to content

Instantly share code, notes, and snippets.

@toraritte
toraritte / gist:2eddbbddddc4841d403c
Last active November 20, 2018 13:08 — forked from spacejam/gist:dd5901c8b2920bb0f1ec
net_kernel:connect/1 VS net_kernel:connect_node/1

=== CALL TRACE OF net_kernel:connect\1

% otp/lib/kernel/src/net_kernel.erl
connect(node_name@machine) -> do_connect(node_name@machine, normal, false). ->
  %          Node,              Type,   WaitForBarred
  do_connect(node_name@machine, normal, false           ) -> %% Type = normal | hidden
    case catch ets:lookup(sys_dist, Node) of
        % [{connection, ...}] if node is in sys_dist
        % []                  if not
	{'EXIT', _} ->