Closed oliveigah closed 2 years ago
Found this bug when implementing this feature on finch! This bug is very dangerous because the resources queue might be emptied without call terminate_worker/3
callback! I think a new release might be appropriate due to the severity of the bug.
:green_heart: :blue_heart: :purple_heart: :yellow_heart: :heart:
The last non idle worker on resource list was being removed incorrectly from the list because of a variable name override.
It ultimately leads to an empty list of workers, that could lead to unexpected behaviours.
The added test simulate a scenario where the only worker would be removed from the resources when the verification cycle executed but the worker is not idle yet.
This led to an empty resources queue and finally the non termination of the pool because the pool has no workers to verify idle.