fix: set error when qemu is dead
This commit is contained in:
parent
5749f7d96e
commit
49760c065e
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user