]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Always sleep a little before calling doconfigure() to make sure the network is comple...
authorMartin Burnicki <burnicki@ntp.org>
Tue, 8 Apr 2008 10:20:22 +0000 (12:20 +0200)
committerMartin Burnicki <burnicki@ntp.org>
Tue, 8 Apr 2008 10:20:22 +0000 (12:20 +0200)
bk: 47fb46e6ThlpuUlCRxt58434Qvj6zQ

ntpd/ntp_intres.c

index 345e42577db3568f35a37a2947fe1278910bdce5..18920285e540451bd05548d7914bfbb570c8e6ca 100644 (file)
@@ -258,12 +258,7 @@ ntp_intres(void)
                (void) unlink(req_file);
 
        /*
-        * Sleep a little to make sure the server is completely up
-        */
-       sleep(SLEEPTIME);
-
-       /*
-        * Set up the timers to do first try immediately.
+        * Set up the timers to do first shot immediately.
         */
        resolve_timer = 0;
        resolve_value = MINRESOLVE;
@@ -273,6 +268,10 @@ ntp_intres(void)
                checkparent();
 
                if (resolve_timer == 0) {
+                       /*
+                        * Sleep a little to make sure the network is completely up
+                        */
+                       sleep(SLEEPTIME);
                        doconfigure(1);
 
                        /* prepare retry, in case there's more work to do */