]> Entropealabs - cluster_kv.git/commitdiff
fix dialyzer error
authorChristopher Coté <ccote@cohesionib.com>
Thu, 28 Jan 2021 01:40:57 +0000 (19:40 -0600)
committerChristopher Coté <ccote@cohesionib.com>
Thu, 28 Jan 2021 01:40:57 +0000 (19:40 -0600)
lib/cluster_kv/ring.ex

index 198959e5cb2367bdf2da14f6fd8e414c537ef59f..5a8c2e0325f9bede636aaea4d330165a68acdf90 100644 (file)
@@ -588,10 +588,14 @@ defmodule ClusterKV.Ring do
 
   @spec send_sync(
           name :: module(),
-          nodes :: [node()],
-          key :: {String.t(), String.t()},
+          nodes :: [node()] | {:error, {:invalid_ring, :no_nodes}},
+          key :: binary(),
           value :: any()
         ) :: :ok
+  defp send_sync(_name, {:error, er}, _key, _value) do
+    Logger.warn("No nodes to sync with, #{inspect(er)}")
+  end
+
   defp send_sync(name, nodes, key, value) do
     Enum.each(nodes, fn n ->
       send({name, n}, {:sync, key, value})