Skip to content

Commit 98836d8

Browse files
committed
Support recon:info(Pid, {dictionary, Key}) introduced in OTP 26.2
Keeping the function clause generic so that dialyzer does not complain on older versions where the second arg of erlang:process_info must be an atom or list.
1 parent 0004afe commit 98836d8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/recon.erl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,6 @@ proc_info(Pid, binary_memory) ->
233233
{binary, Bins} ->
234234
{binary_memory, recon_lib:binary_memory(Bins)}
235235
end;
236-
proc_info(Pid, Term) when is_atom(Term) ->
237-
erlang:process_info(Pid, Term);
238236
proc_info(Pid, List) when is_list(List) ->
239237
case lists:member(binary_memory, List) of
240238
false ->
@@ -244,7 +242,9 @@ proc_info(Pid, List) when is_list(List) ->
244242
undefined -> undefined;
245243
Res when is_list(Res) -> proc_fake(List, Res)
246244
end
247-
end.
245+
end;
246+
proc_info(Pid, Term) ->
247+
erlang:process_info(Pid, Term).
248248

249249
%% @private Replace keys around
250250
replace(_, _, []) -> [];

0 commit comments

Comments
 (0)