mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-02-18 03:18:52 -06:00
ociswrapper: break wait if server responds with 200
This commit is contained in:
@@ -120,11 +120,7 @@ func WaitForConnection() bool {
|
||||
req.Header.Set("X-Request-ID", "ociswrapper-"+strconv.Itoa(int(time.Now().UnixMilli())))
|
||||
|
||||
res, err := client.Do(req)
|
||||
if err != nil || res.StatusCode >= 400 {
|
||||
if res != nil {
|
||||
log.Println(fmt.Sprintf("oCIS server up but request failed: %v", res.StatusCode))
|
||||
return true
|
||||
}
|
||||
if err != nil || res.StatusCode != 200 {
|
||||
// 500 milliseconds poll interval
|
||||
time.Sleep(500 * time.Millisecond)
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user