未验证 提交 e3afbdbf 编写于 作者: O Oleg Nenashev 提交者: GitHub

Merge pull request #4023 from jsoref/JENKINS-57466

[JENKINS-57466] If two users trigger updateDirectly -> isDue, make one wait
......@@ -284,12 +284,12 @@ public class UpdateSite {
/**
* Returns true if it's time for us to check for new version.
*/
public boolean isDue() {
public synchronized boolean isDue() {
if(neverUpdate) return false;
if(dataTimestamp == 0)
dataTimestamp = getDataFile().file.lastModified();
long now = System.currentTimeMillis();
retryWindow = Math.max(retryWindow,SECONDS.toMillis(15));
boolean due = now - dataTimestamp > DAY && now - lastAttempt > retryWindow;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册