MSP-4451 add error handling for closing redis client
This commit is contained in:
1 parent
02f355c54d
commit
61f0c1a146
1 file changed
+6
-1
@@ -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
|
||||
}),
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user