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

index bfc508d6d2564f99db13ba37244414e38ec8ac7b..f2ecda0a16e15c66645b2d05204b6ccebfb971b2 100644 (file)
@@ -88,8 +88,13 @@ defmodule Wampex.Router.Realms.Session do
     Logger.info("Update Round Robin: #{inspect(id)} -> #{inspect(v)}: #{inspect(value)}")
 
     case values + 1 do
-      ni when ni < value -> {id, [ni]}
-      _ -> {id, [0]}
+      ni when ni < value ->
+        Logger.info("Incrementing round robin: #{inspect(id)} to #{inspect(ni)}")
+        {id, [ni]}
+
+      _ ->
+        Logger.info("Restarting round robin")
+        {id, [0]}
     end
   end