]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
rpc: wait longer for session daemon to start up
authorCole Robinson <crobinso@redhat.com>
Tue, 15 Mar 2016 21:04:32 +0000 (17:04 -0400)
committerCole Robinson <crobinso@redhat.com>
Thu, 17 Mar 2016 20:25:20 +0000 (16:25 -0400)
https://bugzilla.redhat.com/show_bug.cgi?id=1271183

We only wait 0.5 seconds for the session daemon to start up and present
its socket, which isn't sufficient for many users. Bump up the sleep
interval and retry amount so we wait for a total of 5.0 seconds.

(cherry picked from commit ca0c06f4008154de55e0b3109885facd0bf02d32)

src/rpc/virnetsocket.c

index 2ee4b6ec2b92cc5930df6b883b1f216ec793d042..275f1f5f369054e8428dc962d17478716e13fd51 100644 (file)
@@ -542,7 +542,7 @@ int virNetSocketNewConnectUNIX(const char *path,
     char *lockpath = NULL;
     int lockfd = -1;
     int fd = -1;
-    int retries = 100;
+    int retries = 500;
     virSocketAddr localAddr;
     virSocketAddr remoteAddr;
     char *rundir = NULL;
@@ -635,7 +635,7 @@ int virNetSocketNewConnectUNIX(const char *path,
             daemonLaunched = true;
         }
 
-        usleep(5000);
+        usleep(10000);
     }
 
     localAddr.len = sizeof(localAddr.data);