Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Commit

Permalink
Merge branch 'stable'
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelklishin committed Feb 9, 2016
2 parents 3a8ba20 + f89be36 commit dff2b14
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/rabbit_misc.erl
Original file line number Diff line number Diff line change
Expand Up @@ -882,8 +882,20 @@ is_process_alive(Pid) ->
lists:member(Node, [node() | nodes()]) andalso
rpc:call(Node, erlang, is_process_alive, [Pid]) =:= true.

pget(K, P) -> proplists:get_value(K, P).
pget(K, P, D) -> proplists:get_value(K, P, D).
pget(K, P) ->
case lists:keyfind(K, 1, P) of
{K, V} ->
V;
_ ->
undefined
end.
pget(K, P, D) ->
case lists:keyfind(K, 1, P) of
{K, V} ->
V;
_ ->
D
end.

pget_or_die(K, P) ->
case proplists:get_value(K, P) of
Expand Down

0 comments on commit dff2b14

Please sign in to comment.