delayed_otp icon indicating copy to clipboard operation
delayed_otp copied to clipboard

State in Supervisor.which_children

Open h4cc opened this issue 7 years ago • 0 comments

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.

h4cc avatar Jun 29 '18 14:06 h4cc