11156: Fix infinite loop condition.
[arvados.git] / sdk / go / dispatch / dispatch.go
index fd507371b1c451bd15a5962b74fe6e4c989a44d9..4b22c6302345f3fe8eca18d0beb42b4b341dc441 100644 (file)
@@ -130,7 +130,7 @@ func (d *Dispatcher) checkForUpdates(filters [][]interface{}) {
                        log.Printf("Error getting list of containers: %q", err)
                        return
                }
-               more = list.ItemsAvailable > len(list.Items)
+               more = len(list.Items) > 0 && list.ItemsAvailable > len(list.Items)+offset
                d.checkListForUpdates(list.Items)
        }
 }