1
0

fix: set error when qemu is dead

This commit is contained in:
dump_stack() 2023-05-24 19:46:11 +00:00
parent 5749f7d96e
commit 49760c065e
Signed by: dump_stack
GPG Key ID: BE44DA8C062D87DC

View File

@ -382,6 +382,7 @@ func (q *System) ssh(user string) (client *ssh.Client, err error) {
for retries := q.SSH.Retries; retries > 0; retries-- { for retries := q.SSH.Retries; retries > 0; retries-- {
if q.Died { if q.Died {
err = errors.New("qemu is dead")
return return
} }
@ -519,6 +520,7 @@ func (q System) scp(user, localPath, remotePath string, recursive bool) (err err
func (q *System) scpWithRetry(user, localPath, remotePath string, recursive bool) (err error) { func (q *System) scpWithRetry(user, localPath, remotePath string, recursive bool) (err error) {
for retries := q.SSH.Retries; retries > 0; retries-- { for retries := q.SSH.Retries; retries > 0; retries-- {
if q.Died { if q.Died {
err = errors.New("qemu is dead")
return return
} }