hashicorp / vault-plugin-secrets-openldap

OpenLDAP secret engine for Vault
Mozilla Public License 2.0
17 stars 7 forks source link

Don't leak timers #99

Closed swenson closed 5 months ago

swenson commented 5 months ago

When in the rollback loop, a timer was created, but if the context is finished, then the timer's channel would leak.

In addition, the function said it was doing exponential backoff (presumably from 0 to 512 seconds), but the arguments to the Pow() function were reversed, so it was doing quadratic backoff from 0 to 81 seconds.

Also, there was no test for the rollback function, so one was added.

swenson commented 5 months ago

Thanks!