Commit 1895dee9 authored by Jeromy's avatar Jeromy

fix flatfs warning message

parent 4fa81d12
...@@ -108,7 +108,7 @@ func (fs *Datastore) Put(key datastore.Key, value interface{}) error { ...@@ -108,7 +108,7 @@ func (fs *Datastore) Put(key datastore.Key, value interface{}) error {
} }
var err error var err error
for i := 0; i < putMaxRetries; i++ { for i := 1; i <= putMaxRetries; i++ {
err = fs.doPut(key, val) err = fs.doPut(key, val)
if err == nil { if err == nil {
break break
...@@ -119,7 +119,7 @@ func (fs *Datastore) Put(key datastore.Key, value interface{}) error { ...@@ -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) 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 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