Skip to content

Commit

Permalink
fix: username pass type in vmq_message_store
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvjain99 committed May 14, 2024
1 parent 859fd88 commit ef1e4da
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions apps/vmq_server/src/vmq_message_store.erl
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,22 @@ init([]) ->
]}
]),
Redis = proplists:get_value(redis, StoreCfgs),
Username = case proplists:get_value(username, Redis, undefined) of
undefined -> undefined;
User when is_atom(User) -> atom_to_list(User)
end,
Password = case proplists:get_value(password, Redis, undefined) of
undefined -> undefined;
Pass when is_atom(Pass) -> atom_to_list(Pass)
end,

{ok,
{{one_for_one, 5, 10}, [
{eredis,
{eredis, start_link, [
[
{username, proplists:get_value(username, Redis)},
{password, proplists:get_value(password, Redis)},
{username, Username},
{password, Password},
{name, {local, vmq_message_store_redis_client}}
| vmq_schema_util:parse_list(proplists:get_value(connect_options, Redis))
]
Expand Down

0 comments on commit ef1e4da

Please sign in to comment.