After Node.connect when are the distribution {:global, ..} names ready to use ?

Elixir newb here … looking for a quick fix from community before I go to the ‘source’

I have 2 Elixir nodes (Raspberry Pi 3 B+) distributed across a WiFi home network.
One node runs a GenServer ready to handle calls, the other node runs Elixir code which does
Node.connect :“other-wifi-node” (true) then immediately does GenServer.whereis {:global, “other-service”}

The return from whereis is nil . . unless I wait for a “while”.

How should I know when the :global names are ready after a Node.connect ?

Thanks for any quick leads (-: (-:

Just do a :global.sync after your Node.connect (or, and you should be good


Full speed ahead . . that’s what I needed, thanks !

1 Like