hackney
hackney copied to clipboard
hackney_pool:find_pool/2 adds new child to supervisor
Is it intentional that find_pool/2 starts a new child if the pool does not exist?
I'm asking this cause I thought that the "correct" ways would be to include the child to the user's supervisor or to call start_pool before using it.
Good catch...
Coming version (it's a matter of hours) of the pool doesn't start the pool if it is not existing. Though the new function start_pool/2 start it in the new hackney_pool_sup supervisor. I guess i could add a pool_spec/2 function that create a specification to add to your own supervisor. Would that work for you?
Yes! That would work! :+1: