feat(http): fixed possible panic
This commit is contained in:
parent
088a227dec
commit
25b2af0ba0
1 changed files with 2 additions and 1 deletions
|
|
@ -37,8 +37,9 @@ func main() {
|
|||
redisClient, err := redis.New(&cfg.Redis)
|
||||
if err != nil {
|
||||
log.Info(ctx, "no redis cache: %s", err)
|
||||
} else {
|
||||
defer redisClient.Close()
|
||||
}
|
||||
defer redisClient.Close()
|
||||
|
||||
builder, err := services.New(log, cfg, webMetrics, dbMetric, producer, pgConn, redisClient)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue