Merge pull request #7809 from LK4D4/use_increment
Use increment operator
This commit is contained in:
commit
ec87846908
3 changed files with 5 additions and 5 deletions
|
@ -1218,7 +1218,7 @@ func ServeFd(addr string, handle http.Handler) error {
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
for i := 0; i < len(ls); i += 1 {
|
for i := 0; i < len(ls); i++ {
|
||||||
err := <-chErrors
|
err := <-chErrors
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -1366,7 +1366,7 @@ func ServeApi(job *engine.Job) engine.Status {
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
for i := 0; i < len(protoAddrs); i += 1 {
|
for i := 0; i < len(protoAddrs); i++ {
|
||||||
err := <-chErrors
|
err := <-chErrors
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return job.Error(err)
|
return job.Error(err)
|
||||||
|
|
|
@ -832,7 +832,7 @@ func (devices *DeviceSet) waitRemove(devname string) error {
|
||||||
log.Debugf("[deviceset %s] waitRemove(%s)", devices.devicePrefix, devname)
|
log.Debugf("[deviceset %s] waitRemove(%s)", devices.devicePrefix, devname)
|
||||||
defer log.Debugf("[deviceset %s] waitRemove(%s) END", devices.devicePrefix, devname)
|
defer log.Debugf("[deviceset %s] waitRemove(%s) END", devices.devicePrefix, devname)
|
||||||
i := 0
|
i := 0
|
||||||
for ; i < 1000; i += 1 {
|
for ; i < 1000; i++ {
|
||||||
devinfo, err := getInfo(devname)
|
devinfo, err := getInfo(devname)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// If there is an error we assume the device doesn't exist.
|
// If there is an error we assume the device doesn't exist.
|
||||||
|
@ -861,7 +861,7 @@ func (devices *DeviceSet) waitRemove(devname string) error {
|
||||||
// or b) the 10 second timeout expires.
|
// or b) the 10 second timeout expires.
|
||||||
func (devices *DeviceSet) waitClose(info *DevInfo) error {
|
func (devices *DeviceSet) waitClose(info *DevInfo) error {
|
||||||
i := 0
|
i := 0
|
||||||
for ; i < 1000; i += 1 {
|
for ; i < 1000; i++ {
|
||||||
devinfo, err := getInfo(info.Name())
|
devinfo, err := getInfo(info.Name())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
|
@ -46,7 +46,7 @@ func (r *resumableRequestReader) Read(p []byte) (n int, err error) {
|
||||||
}
|
}
|
||||||
if err != nil && r.failures+1 != r.maxFailures {
|
if err != nil && r.failures+1 != r.maxFailures {
|
||||||
r.cleanUpResponse()
|
r.cleanUpResponse()
|
||||||
r.failures += 1
|
r.failures++
|
||||||
time.Sleep(5 * time.Duration(r.failures) * time.Second)
|
time.Sleep(5 * time.Duration(r.failures) * time.Second)
|
||||||
return 0, nil
|
return 0, nil
|
||||||
} else if err != nil {
|
} else if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue