]> Entropealabs - wampex_router.git/commitdiff
fix for edge case with no live callees
authorChristopher <chris@entropealabs.com>
Thu, 2 Apr 2020 19:22:14 +0000 (14:22 -0500)
committerChristopher <chris@entropealabs.com>
Thu, 2 Apr 2020 19:22:14 +0000 (14:22 -0500)
lib/router/session.ex

index bcb8d7e96a18dee97ccccb224c8dd7e75c3f4dba..42fb4ade8ef8dc26a78916ea3445f68ab722499d 100644 (file)
@@ -731,6 +731,7 @@ defmodule Wampex.Router.Session do
   end
 
   defp get_live_callee(_proxy, [], _index, 0), do: {:error, :no_live_callees}
+  defp get_live_callee(_proxy, [], _index, _), do: {:error, :no_live_callees}
 
   defp get_live_callee(proxy, callees, index, tries) do
     {_id, {pid, node}} = c = Enum.at(callees, index)