From 7dc865668d561dae464de60c5a621b1bf920de6d Mon Sep 17 00:00:00 2001 From: Daniel Bloemendal Date: Mon, 29 Mar 2021 16:36:47 -0400 Subject: [PATCH] Remove add_registration call in start_pid_remotely --- lib/swarm/tracker/tracker.ex | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/swarm/tracker/tracker.ex b/lib/swarm/tracker/tracker.ex index a9a9fe9..6a44aa4 100644 --- a/lib/swarm/tracker/tracker.ex +++ b/lib/swarm/tracker/tracker.ex @@ -1352,8 +1352,10 @@ defmodule Swarm.Tracker do "#{inspect(name)} already registered to #{inspect(pid)} on #{node(pid)}, registering locally" ) - # register named process that is unknown locally - add_registration({name, pid, meta}, from, state) + case from do + nil -> :ok + _ -> GenStateMachine.reply(from, {:ok, pid}) + end :ok {:error, {:noproc, _}} = err ->