remove separate key for L/S count

This commit is contained in:
Lawrence, Rendall
2024-06-27 20:27:20 +03:00
parent 32193ee329
commit f010cabdb1
4 changed files with 74 additions and 70 deletions

View File

@@ -102,8 +102,10 @@ func (h *hook) Close() (err error) {
if cl, isOk := h.hashContainer.(io.Closer); isOk {
err = cl.Close()
}
if stErr := h.providedStorage.Close(); stErr != nil {
err = errors.Join(err, stErr)
if h.providedStorage != nil {
if stErr := h.providedStorage.Close(); stErr != nil {
err = errors.Join(err, stErr)
}
}
return err
}