mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
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 <mkletzan@redhat.com>
This commit is contained in:
parent
8ef4f598f1
commit
48abdf5de7
@ -1958,9 +1958,6 @@ vshCommandRun(vshControl *ctl, const vshCmd *cmd)
|
|||||||
if (!ret)
|
if (!ret)
|
||||||
vshReportError(ctl);
|
vshReportError(ctl);
|
||||||
|
|
||||||
if (!ret && disconnected != 0)
|
|
||||||
vshReconnect(ctl);
|
|
||||||
|
|
||||||
if (STREQ(cmd->def->name, "quit") ||
|
if (STREQ(cmd->def->name, "quit") ||
|
||||||
STREQ(cmd->def->name, "exit")) /* hack ... */
|
STREQ(cmd->def->name, "exit")) /* hack ... */
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user