[PATCH v2 2/2] virsh: Don't reconnect after the command when disconnected

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Each command that needs a connection causes a new connection to be
made.  Reconnecting after a command failed is pointless, mainly when
there is no other command to run.  Removeing three lines of code takes
care of that and keeps virsh working as it should.

Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
---
 tools/virsh.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/tools/virsh.c b/tools/virsh.c
index bcfa561..0ead9ae 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -1958,9 +1958,6 @@ vshCommandRun(vshControl *ctl, const vshCmd *cmd)
         if (!ret)
             vshReportError(ctl);

-        if (!ret && disconnected != 0)
-            vshReconnect(ctl);
-
         if (STREQ(cmd->def->name, "quit") ||
             STREQ(cmd->def->name, "exit"))        /* hack ... */
             return ret;
-- 
2.1.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]