INNER CODE UNIT · Go
client
openocta/openocta · src/cmd/openocta-launcher/main.go:72
client := &http.Client{Timeout: 800 * time.Millisecond}
for time.Now().Before(deadline) {
req, _ := http.NewRequest("GET", url, nil)
res, err := client.Do(req)
if err == nil {
_ = res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 500 {
return nil
}
}
time.Sleep(250 * time.Millisecond)
}
return errors.New("gateway health check timeout")
}
func openBrowser(url string) error {
switch runtime.GOOS {
case "darwin":