Skip to content

Commit

Permalink
[FIXED JENKINS-24914] Don't block indefinitely every other month
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-beck committed Oct 8, 2014
1 parent 07fd5fa commit adf8305
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/src/main/java/jenkins/model/Jenkins.java
Expand Up @@ -2949,9 +2949,10 @@ public HttpRedirect doQuietDown(
isQuietingDown = true;
}
if (block) {
if (timeout > 0) timeout += System.currentTimeMillis();
long waitUntil = timeout;
if (timeout > 0) waitUntil += System.currentTimeMillis();
while (isQuietingDown
&& (timeout <= 0 || System.currentTimeMillis() < timeout)
&& (timeout <= 0 || System.currentTimeMillis() < waitUntil)
&& !RestartListener.isAllReady()) {
Thread.sleep(1000);
}
Expand Down

0 comments on commit adf8305

Please sign in to comment.