Browse Source

commit be9f52538e7e3b30785e73316db238bef0c0ba29
Author: Konstantin Boudnik <cos@yahoo-inc.com>
Date: Thu Dec 10 11:23:34 2009 -0800

HADOOP-6428 from https://issues.apache.org/jira/secure/attachment/12427624/HADOOP-6428.0.20.patch

+++ b/YAHOO-CHANGES.txt
+ HADOOP-6428. HttpServer sleeps with negative values (cos)


git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20-security-patches@1077071 13f79535-47bb-0310-9956-ffa450edef68

Owen O'Malley 14 years ago
parent
commit
3e60bfe186
1 changed files with 1 additions and 2 deletions
  1. 1 2
      src/core/org/apache/hadoop/http/HttpServer.java

+ 1 - 2
src/core/org/apache/hadoop/http/HttpServer.java

@@ -463,14 +463,13 @@ public class HttpServer implements FilterContainer {
           port = listener.getLocalPort();
           if (port < 0) {
             LOG.warn("Bounds port is " + port + " after webserver start");
-            Random r = new Random(1000);
             for (int i = 0; i < MAX_RETRIES/2; i++) {
               try {
                 webServer.stop();
               } catch (Exception e) {
                 LOG.warn("Can't stop  web-server", e);
               }
-              Thread.sleep(r.nextInt());
+              Thread.sleep(1000);
               
               listener.setPort(oriPort == 0 ? 0 : (oriPort += 1));
               listener.open();