Hey, anyone know why I’m getting this error when Node.spawn
ing from within a module? It works fine from IEX.
Here’s the code:
def handle_cast({:link_house, id}, state) do
# TODO: Get node hostname from hashring using house id
session_pid = self()
Node.spawn(:"hivencore1@Phineas-MacBook-Pro", fn ->
HivenCore.Connectivity.Remote.link_session_to_house(id, %{pid: session_pid, id: "test"})
end)
{:noreply, state}
end
Also note that it doesn’t matter what I put within the function, it’ll always give that error.
I also receive the error on the remote node as well as the calling node.
Thanks!