Commit 3d0df5c8 authored by Dustin L. Howett's avatar Dustin L. Howett

[expirator] Remove the item from the handle map before we destroy it.

This avoids a potential infinite recursion when an object that is
destroyed calls back to have itself de-registered from expiration.
parent ca5bf290
......@@ -146,11 +146,13 @@ func (e *Expirator) Run() {
case expiration := <-e.expirationChannel:
glog.Info("Expiring ", expiration.ID)
expirable, _ := e.Store.GetExpirable(expiration.ID)
delete(e.expirationMap, expiration.ID)
if expirable != nil {
delete(e.expirationMap, expiration.ID)
e.flushRequired = true
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment