diff options
author | Alex Auvolat <alex@adnab.me> | 2018-09-11 15:39:09 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2018-09-11 15:39:09 +0200 |
commit | a033c82a3c656a8f53feb60b5b149680771ac247 (patch) | |
tree | bc3cb9a6954aebcfd1a0c5f61d367e1083802c3e /shardweb/lib/shard_web/channels | |
parent | e92969db3f0a2093da16eb7db18c9db49225a719 (diff) | |
download | shard-a033c82a3c656a8f53feb60b5b149680771ac247.tar.gz shard-a033c82a3c656a8f53feb60b5b149680771ac247.zip |
Use DETS to store shard & peer list to disk
Diffstat (limited to 'shardweb/lib/shard_web/channels')
-rw-r--r-- | shardweb/lib/shard_web/channels/room_channel.ex | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/shardweb/lib/shard_web/channels/room_channel.ex b/shardweb/lib/shard_web/channels/room_channel.ex index 2dd733b..bb41a74 100644 --- a/shardweb/lib/shard_web/channels/room_channel.ex +++ b/shardweb/lib/shard_web/channels/room_channel.ex @@ -6,8 +6,8 @@ defmodule ShardWeb.RoomChannel do def join("room:" <> room_name, payload, socket) do if authorized?(payload) do - list = for {_chid, manifest, chpid} <- :ets.tab2list(:shard_db), - {:chat, chan} = manifest, + list = for {_chid, manifest, chpid} <- Shard.Manager.list_shards, + %SApp.Chat.Manifest{channel: chan} = manifest, do: {chan, chpid} pid = case List.keyfind(list, room_name, 0) do nil -> |