Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/grpc/client/connection.ex
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,8 @@ defmodule GRPC.Client.Connection do
:refresh,
%{lb_mod: lb_mod, lb_state: lb_state, real_channels: channels, virtual_channel: vc} =
state
) do
)
when not is_nil(lb_mod) do
{:ok, {prefer_host, prefer_port}, new_lb_state} = lb_mod.pick(lb_state)

channel_key = "#{prefer_host}:#{prefer_port}"
Expand All @@ -294,6 +295,8 @@ defmodule GRPC.Client.Connection do
end
end

def handle_info(:refresh, state), do: {:noreply, state}

def handle_info({:DOWN, _ref, :process, pid, reason}, state) do
Logger.warning(
"#{inspect(__MODULE__)} received :DOWN from #{inspect(pid)} with reason: #{inspect(reason)}"
Expand Down
Loading