Commit 92a2e45d authored by Jeromy's avatar Jeromy

fix flatfs warning message

parent b1538c10
......@@ -108,7 +108,7 @@ func (fs *Datastore) Put(key datastore.Key, value interface{}) error {
}
var err error
for i := 0; i < putMaxRetries; i++ {
for i := 1; i <= putMaxRetries; i++ {
err = fs.doPut(key, val)
if err == nil {
break
......@@ -119,7 +119,7 @@ func (fs *Datastore) Put(key datastore.Key, value interface{}) error {
}
log.Errorf("too many open files, retrying in %dms", 100*i)
time.Sleep(time.Millisecond * 100 * time.Duration(i+1))
time.Sleep(time.Millisecond * 100 * time.Duration(i))
}
return err
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment