Fix issue with reading timeouts on Delete

Original fix by @jringuette but I couldn't get his patch to apply after
the repo split :/
This commit is contained in:
joel.ringuette 2017-06-22 16:24:24 -05:00 committed by Clint
parent 11dc0c5fdf
commit ffddf96603
1 changed files with 6 additions and 0 deletions

View File

@ -142,6 +142,12 @@ func (r *Resource) Apply(
if err := rt.DiffDecode(d); err != nil {
log.Printf("[ERR] Error decoding ResourceTimeout: %s", err)
}
} else if s != nil {
if _, ok := s.Meta[TimeoutKey]; ok {
if err := rt.StateDecode(s); err != nil {
log.Printf("[ERR] Error decoding ResourceTimeout: %s", err)
}
}
} else {
log.Printf("[DEBUG] No meta timeoutkey found in Apply()")
}