Просмотр исходного кода

Fix: redis connection pool exhausted due to failure to release connections

Rod Hynes 9 лет назад
Родитель
Сommit
1c06d46211
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      psiphon/server/redis.go

+ 1 - 0
psiphon/server/redis.go

@@ -63,6 +63,7 @@ func UpdateRedisForLegacyPsiWeb(psiphonSessionID string, geoIPData GeoIPData) er
 	}
 	}
 
 
 	conn := redisPool.Get()
 	conn := redisPool.Get()
+	defer conn.Close()
 
 
 	// Note: using SET with NX (set if not exists) so as to not clobber
 	// Note: using SET with NX (set if not exists) so as to not clobber
 	// any existing records set by an upstream connection server (i.e.,
 	// any existing records set by an upstream connection server (i.e.,