Skip to content

Commit

Permalink
fix(adder): because we now have VisConfig as a possible field in data…
Browse files Browse the repository at this point in the history
…set, we need to make another channel available to the adder (from 8 to 9). Fixed in both ipfs and memfs
  • Loading branch information
ramfox committed Feb 2, 2018
1 parent 4055c2f commit aef9d08
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions ipfs/filestore.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ func (fs *Filestore) NewAdder(pin, wrap bool) (cafs.Adder, error) {
return nil, fmt.Errorf("error allocating adder: %s", err.Error())
}

outChan := make(chan interface{}, 8)
added := make(chan cafs.AddedFile, 8)
outChan := make(chan interface{}, 9)
added := make(chan cafs.AddedFile, 9)
a.Out = outChan
a.Pin = pin
a.Wrap = wrap
Expand Down Expand Up @@ -243,7 +243,7 @@ func (fs *Filestore) AddPath(path string, pin bool) (hash string, err error) {
return
}

outChan := make(chan interface{}, 8)
outChan := make(chan interface{}, 9)
defer close(outChan)

fileAdder.Out = outChan
Expand Down Expand Up @@ -303,7 +303,7 @@ func (fs *Filestore) AddFile(file cafs.File, pin bool) (hash string, err error)
}

errChan := make(chan error, 0)
outChan := make(chan interface{}, 8)
outChan := make(chan interface{}, 9)

fileAdder.Out = outChan

Expand Down
2 changes: 1 addition & 1 deletion memfs/mem_filestore.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func (m MapStore) Delete(key datastore.Key) error {
}

func (m MapStore) NewAdder(pin, wrap bool) (cafs.Adder, error) {
addedOut := make(chan cafs.AddedFile, 8)
addedOut := make(chan cafs.AddedFile, 9)
return &adder{
mapstore: m,
out: addedOut,
Expand Down

0 comments on commit aef9d08

Please sign in to comment.