Description
Pull request:
https://github.com/apache/curator/pull/3
When closing providers, we regularly see an erroneous warning related to a failure to cancel cache tasks.
This change applies some more defensive checks before attempting to cancel tasks, ensuring that the cancel operation is only attempted if the future has not completed.