Pass correct update flag to TTLFunc

pull/6/head
Jordan Liggitt 2015-05-17 00:42:30 -04:00
parent d51e131726
commit a2d6dd0467
1 changed files with 3 additions and 3 deletions

View File

@ -238,7 +238,7 @@ func (e *Etcd) UpdateWithName(ctx api.Context, name string, obj runtime.Object)
}
ttl := uint64(0)
if e.TTLFunc != nil {
ttl, err = e.TTLFunc(obj, false)
ttl, err = e.TTLFunc(obj, true)
if err != nil {
return err
}
@ -281,7 +281,7 @@ func (e *Etcd) Update(ctx api.Context, obj runtime.Object) (runtime.Object, bool
}
ttl := uint64(0)
if e.TTLFunc != nil {
ttl, err = e.TTLFunc(obj, true)
ttl, err = e.TTLFunc(obj, false)
if err != nil {
return nil, 0, err
}
@ -303,7 +303,7 @@ func (e *Etcd) Update(ctx api.Context, obj runtime.Object) (runtime.Object, bool
}
ttl := uint64(0)
if e.TTLFunc != nil {
ttl, err = e.TTLFunc(obj, false)
ttl, err = e.TTLFunc(obj, true)
if err != nil {
return nil, 0, err
}