mirror of
https://github.com/mulgadc/spinifex.git
synced 2026-10-22 12:16:52 +00:00
34badea0d9
handleRelease cancelled the per-lease renewal goroutine but deleted the KV entry without waiting for it to exit. An in-flight reaffirm/renew Put could land after the Delete, re-creating the lease and leaking a KV record. Add a per-loop done channel and block on it after cancel so any pending Put completes before the delete, making DrainAll's release path deterministically synchronous.