]> Entropealabs - cluster_kv.git/commitdiff
proper return from init_node info handler
authorChristopher <chris@entropealabs.com>
Sun, 8 Mar 2020 15:44:58 +0000 (10:44 -0500)
committerChristopher <chris@entropealabs.com>
Sun, 8 Mar 2020 15:44:58 +0000 (10:44 -0500)
lib/cluster_kv/ring.ex

index d7e077292330f69513f8f217b16e3800dde8bd13..324e3519ed8476b8b3c34b7f3799791922ef00ba 100644 (file)
@@ -320,7 +320,7 @@ defmodule ClusterKV.Ring do
     {:ok, sl, []}
   end
 
-  def handle_info({:init_node, node}, _, %SL{data: %Ring{name: n, ring: r, db: db}}) do
+  def handle_info({:init_node, node}, _, %SL{data: %Ring{name: n, ring: r, db: db}} = sl) do
     batch =
       db
       |> DB.stream()
@@ -334,6 +334,7 @@ defmodule ClusterKV.Ring do
       end)
 
     send_batch(n, batch)
+    {:ok, sl, []}
   end
 
   def handle_info(e, s, sl) do