mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-06-20 23:26:13 +08:00
guests: sshable: fix breaking out from wait loop
This commit is contained in:
@@ -213,10 +213,11 @@ func (guest *SGuest) sshableTryEach(
|
||||
|
||||
tmo := time.NewTimer(13 * time.Second)
|
||||
tick := time.NewTicker(3 * time.Second)
|
||||
out:
|
||||
for {
|
||||
select {
|
||||
case <-tmo.C:
|
||||
break
|
||||
break out
|
||||
case <-tick.C:
|
||||
if ok := guest.sshableTryForward(ctx, tryData, &fwd); ok {
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user