diff options
author | Alex Auvolat <alex@adnab.me> | 2018-10-12 22:11:45 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2018-10-12 22:11:45 +0200 |
commit | eab3f9483b3659b1ad3572393d24652cac71c8b6 (patch) | |
tree | d8066ff0c173ef74bb9758707d8428a5f922bd8b /shard/lib/net/manager.ex | |
parent | 574b572fac144135c4381581351445bf5d0de81c (diff) | |
download | shard-eab3f9483b3659b1ad3572393d24652cac71c8b6.tar.gz shard-eab3f9483b3659b1ad3572393d24652cac71c8b6.zip |
fixes to connection logic
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""" |