Add runtime support: don't only listen on /tmp/frajtano1, script to add peer
This commit is contained in:
@@ -49,6 +49,7 @@ defmodule Frajtano.Agent do
|
||||
|
||||
@impl true
|
||||
def handle_call({:add_peer, path}, _from, state) do
|
||||
# TODO: deduplicate peers by socket path
|
||||
case Peer.start(path) do
|
||||
{:ok, _} -> {:reply, :ok, state}
|
||||
{:error, error} -> {:reply, {:error, error}, state}
|
||||
|
||||
Reference in New Issue
Block a user