Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong tuple size used in match #31

Open
etnt opened this issue Dec 21, 2023 · 1 comment
Open

Wrong tuple size used in match #31

etnt opened this issue Dec 21, 2023 · 1 comment

Comments

@etnt
Copy link

etnt commented Dec 21, 2023

In the system_monitor:terminate/2 there is a tuple match done with what is stored in State#state.monitors;
this looks wrong to me, surely it should match against a 5-element tuple ( {Module,Function,RunOnTerminate, TicksReset, TicksDecremented} ) and not as it is done today (a 4-element tuple).

{Monitor, true, _TicksReset, _Ticks} <- State#state.monitors].

@mikpe
Copy link
Member

mikpe commented Dec 21, 2023

To me it looks like terminate/2 should match 5-tuples as you wrote and apply(Module, Function, []) not apply(?MODULE, Monitor, []). Currently the function is a no-op.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants