Merge pull request #11845 from kjellwinblad/kjell/shared_con/EMQX-11271

fix: crash when listing non bridge_v1 compatible bridge_v2
This commit is contained in:
Kjell Winblad 2023-10-30 20:29:36 +01:00 committed by GitHub
commit 9d7ed31c3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 3 deletions

View File

@ -233,9 +233,13 @@ list_with_lookup_fun(LookupFun) ->
fun(Name, _RawConf, Acc) ->
[
begin
{ok, BridgeInfo} =
LookupFun(Type, Name),
BridgeInfo
case LookupFun(Type, Name) of
{ok, BridgeInfo} ->
BridgeInfo;
{error, not_bridge_v1_compatible} = Err ->
%% Filtered out by the caller
Err
end
end
| Acc
]