fix(shared): send to sub anyway
This commit is contained in:
parent
1a5293e4b4
commit
e175b3a1d6
|
@ -286,15 +286,17 @@ do_pick(Strategy, ClientId, SourceTopic, Group, Topic, FailedSubs) ->
|
|||
%% Genuinely no subscriber
|
||||
false;
|
||||
[] ->
|
||||
%% All offline? pick one anyway
|
||||
%% We redispatch only to subs who dropped the message because inflight was full.
|
||||
%% We try redispatch to subs who dropped the message because inflight was full.
|
||||
Found = maps_find_by(FailedSubs, fun({SubPid, FailReason}) ->
|
||||
FailReason == dropped andalso is_alive_sub(SubPid)
|
||||
end),
|
||||
case Found of
|
||||
error -> false;
|
||||
{ok, Dropped} ->
|
||||
{retry, pick_subscriber(Group, Topic, Strategy, ClientId, SourceTopic, [Dropped])}
|
||||
%% Found dropped client
|
||||
{retry, pick_subscriber(Group, Topic, Strategy, ClientId, SourceTopic, [Dropped])};
|
||||
error ->
|
||||
%% All offline? pick one anyway
|
||||
{retry, pick_subscriber(Group, Topic, Strategy, ClientId, SourceTopic, All)}
|
||||
end;
|
||||
Subs ->
|
||||
%% More than one available
|
||||
|
|
Loading…
Reference in New Issue