src/share/classes/com/sun/jndi/ldap/Connection.java

Print this page

        

@@ -109,11 +109,11 @@
   */
 public final class Connection implements Runnable {
 
     private static final boolean debug = false;
     private static final int dump = 0; // > 0 r, > 1 rw
-    public static final long DEFAULT_READ_TIMEOUT_MILLIS = 15 * 1000; // 15 second timeout;
+    // public static final long DEFAULT_READ_TIMEOUT_MILLIS = 15 * 1000; // 15 second timeout;
 
 
     final private Thread worker;    // Initialized in constructor
 
     private boolean v3 = true;       // Set in setV3()

@@ -458,14 +458,14 @@
                         if (readTimeout > 0) {  // Socket read timeout is specified
 
                             // will be woken up before readTimeout only if reply is
                             // available
                             ldr.wait(readTimeout);
+                            waited = true;
                         } else {
-                            ldr.wait(DEFAULT_READ_TIMEOUT_MILLIS);
+                            ldr.wait();
                         }
-                        waited = true;
                     } else {
                         break;
                     }
                 }
             } catch (InterruptedException ex) {