change: remove ios health check

This commit is contained in:
debugtalk
2022-09-27 18:45:56 +08:00
parent e34872ce04
commit c423860ecd
2 changed files with 2 additions and 18 deletions

View File

@@ -10,9 +10,8 @@ import (
)
var (
DefaultWaitTimeout = 60 * time.Second
DefaultWaitInterval = 400 * time.Millisecond
DefaultKeepAliveInterval = 30 * time.Second
DefaultWaitTimeout = 60 * time.Second
DefaultWaitInterval = 400 * time.Millisecond
)
type AlertAction string

View File

@@ -13,7 +13,6 @@ import (
"net/url"
"regexp"
"strings"
"time"
giDevice "github.com/electricbubble/gidevice"
"github.com/pkg/errors"
@@ -220,20 +219,6 @@ func (dev *IOSDevice) NewUSBDriver(capabilities Capabilities) (driver WebDriver,
}
_, err = wd.NewSession(capabilities)
go func() {
if DefaultKeepAliveInterval <= 0 {
return
}
ticker := time.NewTicker(DefaultKeepAliveInterval)
for {
<-ticker.C
if healthy, err := wd.IsHealthy(); err != nil || !healthy {
ticker.Stop()
return
}
}
}()
return wd, err
}