fix(bridge): keep bridge name type as binary don't convert it to atom
After investigation, it was confirmed that there was no need to convert the bridge name to atom
This commit is contained in:
parent
a0cd344752
commit
73b4ac9f65
|
@ -59,9 +59,10 @@ bridge_id(BridgeType, BridgeName) ->
|
|||
Type = bin(BridgeType),
|
||||
<<Type/binary, ":", Name/binary>>.
|
||||
|
||||
-spec parse_bridge_id(list() | binary() | atom()) -> {atom(), binary()}.
|
||||
parse_bridge_id(BridgeId) ->
|
||||
case string:split(bin(BridgeId), ":", all) of
|
||||
[Type, Name] -> {binary_to_atom(Type, utf8), binary_to_atom(Name, utf8)};
|
||||
[Type, Name] -> {binary_to_atom(Type, utf8), Name};
|
||||
_ -> error({invalid_bridge_id, BridgeId})
|
||||
end.
|
||||
|
||||
|
|
Loading…
Reference in New Issue