From: Martin Kletzander Date: Mon, 1 Dec 2014 10:46:14 +0000 (+0100) Subject: virsh: Don't reconnect after the command when disconnected X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=48abdf5de7dbb81d4091235efc57cf07fd45cb86;p=libvirt.git virsh: Don't reconnect after the command when disconnected 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 --- diff --git a/tools/virsh.c b/tools/virsh.c index bcfa56119f..0ead9aee43 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;