Skip to content

Commit

Permalink
fix flatfs warning message
Browse files Browse the repository at this point in the history
  • Loading branch information
whyrusleeping committed Jul 26, 2016
1 parent 4fa81d1 commit 1895dee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flatfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
}
Expand Down

0 comments on commit 1895dee

Please sign in to comment.