diff options
author | Marc-André Lureau <marcandre.lureau@gmail.com> | 2014-03-07 14:59:20 +0100 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2014-06-03 17:45:55 +0200 |
commit | ef04d6e88cd32f391aa620f723df3eddaa7d4751 (patch) | |
tree | 9c2e9b9d96cf304efaee2cd92305a3457b7f6a82 /SpiceXPI/src/plugin/controller.cpp | |
parent | 453f0deb5c42d06c61ef28c3578a700ce9e6d69d (diff) |
controller: return immediately if already connected
Do not try again if the unix socket is already connected, but fail
immediately.
https://bugzilla.redhat.com/show_bug.cgi?id=1073461
Diffstat (limited to 'SpiceXPI/src/plugin/controller.cpp')
-rw-r--r-- | SpiceXPI/src/plugin/controller.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/SpiceXPI/src/plugin/controller.cpp b/SpiceXPI/src/plugin/controller.cpp index 988768b..bd8b9d7 100644 --- a/SpiceXPI/src/plugin/controller.cpp +++ b/SpiceXPI/src/plugin/controller.cpp @@ -94,6 +94,8 @@ int SpiceController::Connect(const int nRetries) for (int i = 0; rc != 0 && i < nRetries; ++i) { rc = Connect(); + if (rc == 1) + break; g_usleep(sleep_time * G_USEC_PER_SEC); } if (rc != 0) { |