mirror of
https://github.com/go-micro/go-micro.git
synced 2025-05-31 21:59:42 +02:00
Fix nil pointer dereference (#1289)
This commit is contained in:
parent
eebd69c995
commit
beb5e80e87
@ -231,7 +231,9 @@ func (w *workersKV) Read(key string, opts ...store.ReadOption) ([]*store.Record,
|
|||||||
}
|
}
|
||||||
record.Expiry = time.Until(time.Unix(expiryUnix, 0))
|
record.Expiry = time.Until(time.Unix(expiryUnix, 0))
|
||||||
}
|
}
|
||||||
w.cache.Set(record.Key, record, cache.DefaultExpiration)
|
if w.cache != nil {
|
||||||
|
w.cache.Set(record.Key, record, cache.DefaultExpiration)
|
||||||
|
}
|
||||||
records = append(records, record)
|
records = append(records, record)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user