From 558dc2221e7600067546aecf9270d4d81c588000 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 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/swarm/tracker/tracker.ex b/lib/swarm/tracker/tracker.ex index a9a9fe9..a16de03 100644 --- a/lib/swarm/tracker/tracker.ex +++ b/lib/swarm/tracker/tracker.ex @@ -1352,9 +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) - :ok + case from do + nil -> :ok + _ -> GenStateMachine.reply(from, {:ok, pid}) + end {:error, {:noproc, _}} = err -> warn(