Deduplicate sockets by path
This commit is contained in:
@@ -4,11 +4,11 @@ defmodule Frajtano.Peer do
|
||||
use GenServer, restart: :temporary
|
||||
|
||||
def start(path) do
|
||||
DynamicSupervisor.start_child(Frajtano.Peer, {__MODULE__, path})
|
||||
DynamicSupervisor.start_child(Frajtano.PeerSupervisor, {__MODULE__, path})
|
||||
end
|
||||
|
||||
def start_link(path) do
|
||||
GenServer.start_link(__MODULE__, path)
|
||||
GenServer.start_link(__MODULE__, path, name: {:via, Registry, {Frajtano.Peers, path}})
|
||||
end
|
||||
|
||||
@impl true
|
||||
|
||||
Reference in New Issue
Block a user