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

State in Supervisor.which_children #4

Open
h4cc opened this issue Jun 29, 2018 · 0 comments
Open

State in Supervisor.which_children #4

h4cc opened this issue Jun 29, 2018 · 0 comments

Comments

@h4cc
Copy link

h4cc commented Jun 29, 2018

When calling a which_children with a child that is currently delayed, the result for child does not match the Supervisor behaviour because next to a pid, :restarting and :unknown the value nil can be returned.

See: https://hexdocs.pm/elixir/Supervisor.html#which_children/1

This function in DelayedServer will return nil:
def handle_call(:delayed_pid, _from, state), do: {:reply,state.pid,state}

I think this function should not return nil, but rather :restarting or maybe a new value like :delayed.

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

1 participant