From 1507e6724b26985dbffafdd5fbea9fe9b37bc342 Mon Sep 17 00:00:00 2001 From: hantmac Date: Mon, 26 Aug 2019 10:38:40 +0800 Subject: [PATCH] hot fix:fix redis lose connection problem --- backend/database/pubsub.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/database/pubsub.go b/backend/database/pubsub.go index b100535f..01e52fa1 100644 --- a/backend/database/pubsub.go +++ b/backend/database/pubsub.go @@ -46,12 +46,12 @@ func (c *Subscriber) Connect() { panic(errors.New("redis connection failed too many times, panic")) } con, err := GetRedisConn() + i += 1 if err != nil { log.Error("redis dial failed") continue } c.client = redis.PubSubConn{Conn: con} - i += 1 continue }