MSP-4451 add error handling for closing redis client

This commit is contained in:
Пучков Андрей Павлович committed 2024-11-18 16:29:44 +03:00
1 parent 02f355c54d
commit 61f0c1a146
1 file changed
+6 -1
+6 -1
View File
@@ -83,7 +83,12 @@ func (a *Assembly) Closers() []app.Closer {
return nil
}),
app.CloserFunc(func() error {
_ = a.redisCli.Close()
if a.redisCli != nil {
err := a.redisCli.Close()
if err != nil {
return errors.WithMessage(err, "shutdown redis client")
}
}
return nil
}),
}