WANG il y a 6 ans
Parent
commit
8eb76b3fdd

+ 4 - 3
src/main/java/cn/com/qmth/examcloud/web/upyun/UpyunSiteManager.java

@@ -71,9 +71,10 @@ public class UpyunSiteManager {
 				throw new StatusException("520004", "domain is not configured. upyunId=" + upyunId);
 			}
 
-			UpYunClient upYunClient = new UpYunClient(bucketName, userName, password, domain);
-
-			CLIENT_HOLDERS.put(upyunSite.getId(), upYunClient);
+			if (null == CLIENT_HOLDERS.get(upyunSite.getId())) {
+				UpYunClient upYunClient = new UpYunClient(bucketName, userName, password, domain);
+				CLIENT_HOLDERS.put(upyunSite.getId(), upYunClient);
+			}
 		}
 
 	}