]> xenbits.xensource.com Git - libvirt.git/commitdiff
virsh: Don't reconnect after the command when disconnected
authorMartin Kletzander <mkletzan@redhat.com>
Mon, 1 Dec 2014 10:46:14 +0000 (11:46 +0100)
committerMartin Kletzander <mkletzan@redhat.com>
Mon, 8 Dec 2014 12:03:49 +0000 (13:03 +0100)
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@redhat.com>
tools/virsh.c

index bcfa56119f635e55b734a5b8ff0d52fd0b67db0c..0ead9aee4388c3eb0cf100b1a8afc7002bb2fc21 100644 (file)
@@ -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;