From: Christopher Date: Thu, 16 Apr 2020 18:33:40 +0000 (-0500) Subject: default to first callee on bad index X-Git-Url: http://git.entropealabs.com/?a=commitdiff_plain;h=0828a6cfe55ee7d963b11970cc72b88f5b9fe1ec;p=wampex_router.git default to first callee on bad index --- diff --git a/lib/router/session.ex b/lib/router/session.ex index 2b2e806..6a57c1c 100644 --- a/lib/router/session.ex +++ b/lib/router/session.ex @@ -751,7 +751,7 @@ defmodule Wampex.Router.Session do end defp get_live_callee(proxy, callees, index, tries) when is_list(callees) do - {_id, {pid, node}} = c = Enum.at(callees, index) + {_id, {pid, node}} = c = Enum.at(callees, index, Enum.at(callees, 0)) case GenServer.call({proxy, node}, {:is_up, pid}) do true ->