diff options
Diffstat (limited to 'shard/lib/net/manager.ex')
-rw-r--r-- | shard/lib/net/manager.ex | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/shard/lib/net/manager.ex b/shard/lib/net/manager.ex index 624d7e6..dd80347 100644 --- a/shard/lib/net/manager.ex +++ b/shard/lib/net/manager.ex @@ -72,7 +72,7 @@ defmodule SNet.Manager do [] -> my_port = Application.get_env(:shard, :port) {:ok, pid} = SNet.TCPConn.start_link(%{connect_to: peer_info, my_port: my_port, auth: auth}) - :ets.insert(:connections, {peer_info, pid, nil}) + :ets.insert(:connections, {peer_info, pid, auth}) pid end end @@ -93,7 +93,7 @@ defmodule SNet.Manager do Return the list of all connected peers """ def list_connections() do - for [x] <- :ets.match(:connections, :"$1"), do: x + :ets.tab2list(:connections) end @doc""" |