From 417a13c1be8c3ff30b21f8a436081ba6501200a8 Mon Sep 17 00:00:00 2001 From: UlricQin Date: Sun, 7 Feb 2021 17:07:00 +0800 Subject: [PATCH] bugfix: judge: redis conn pools --- control | 2 +- src/modules/judge/backend/redi/redis.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/control b/control index 5600fcfa..f759b4ee 100755 --- a/control +++ b/control @@ -1,7 +1,7 @@ #!/bin/bash # release version -version=3.6.0 +version=3.6.1 CWD=$(cd $(dirname $0)/; pwd) cd $CWD diff --git a/src/modules/judge/backend/redi/redis.go b/src/modules/judge/backend/redi/redis.go index 8957b8b2..83c9a0f9 100644 --- a/src/modules/judge/backend/redi/redis.go +++ b/src/modules/judge/backend/redi/redis.go @@ -39,7 +39,8 @@ func Init(cfg RedisSection) { connTimeout := time.Duration(cfg.Timeout.Conn) * time.Millisecond readTimeout := time.Duration(cfg.Timeout.Read) * time.Millisecond writeTimeout := time.Duration(cfg.Timeout.Write) * time.Millisecond - for _, addr := range addrs { + for i := range addrs { + addr := addrs[i] redisConnPool := &redis.Pool{ MaxIdle: maxIdle, IdleTimeout: idleTimeout,