sockets_for_topic = Enum.uniq([socket | sockets_for_topic])
sockets = Map.put(sockets, topic, sockets_for_topic)
Logger.debug("Got new conn for #{topic}")
- IO.inspect(sockets)
{:noreply, sockets}
end
sockets_for_topic = List.delete(sockets_for_topic, socket)
sockets = Map.put(sockets, topic, sockets_for_topic)
Logger.debug("Removed conn for #{topic}")
- IO.inspect(sockets)
{:noreply, sockets}
end
def handle_cast(m, state) do
- IO.inspect("Unknown: #{inspect(m)}, #{inspect(state)}")
+ Logger.info("Unknown: #{inspect(m)}, #{inspect(state)}")
{:noreply, state}
end