]> Entropealabs - wampex_router.git/commitdiff
more logging
authorChristopher <chris@entropealabs.com>
Thu, 16 Apr 2020 14:00:57 +0000 (09:00 -0500)
committerChristopher <chris@entropealabs.com>
Thu, 16 Apr 2020 14:00:57 +0000 (09:00 -0500)
lib/router/realms/session.ex

index bbe12a58abb800f659d0de3b80dc4c48b0e0f4c8..36b0af0f008484331efd2e2eba2546cb3f3321bf 100644 (file)
@@ -1,6 +1,8 @@
 defmodule Wampex.Router.Realms.Session do
   @moduledoc false
 
+  require Logger
+
   @max_id 9_007_199_254_740_992
 
   def register(db, realm, procedure, val) do
@@ -74,7 +76,9 @@ defmodule Wampex.Router.Realms.Session do
     current_id + 1
   end
 
-  defp update_round_robin({id, [values]}, value) do
+  defp update_round_robin({id, [values] = v}, value) do
+    Logger.info("Update Round Robin: #{inspect(id)} -> #{inspect(v)}: #{inspect(value)}")
+
     case values + 1 do
       ni when ni < value -> {id, [ni]}
       _ -> {id, [0]}