Skip to content

Commit

Permalink
Cleanup dead code in gen_server
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Guyot <[email protected]>
  • Loading branch information
pguyot committed Dec 14, 2024
1 parent edbe90c commit 9f1091a
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions libs/estdlib/src/gen_server.erl
Original file line number Diff line number Diff line change
Expand Up @@ -575,12 +575,7 @@ loop(#state{mod = Mod, mod_state = ModState} = State, Timeout) ->
end.

%% @private
do_terminate(#state{mod = Mod, name = Name} = _State, Reason, ModState) ->
case Name of
undefined -> ok;
%% TODO unregister
_Pid -> ok
end,
do_terminate(#state{mod = Mod} = _State, Reason, ModState) ->
case erlang:function_exported(Mod, terminate, 2) of
true ->
Mod:terminate(Reason, ModState);
Expand Down

0 comments on commit 9f1091a

Please sign in to comment.