Skip to content

Commit 8a4c15d

Browse files
committedJul 29, 2015
ipnsfs: remove context.TODO(), wire to FS context
License: MIT Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
1 parent d4037f5 commit 8a4c15d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎ipnsfs/system.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ var ErrIsDirectory = errors.New("error: is a directory")
3434

3535
// Filesystem is the writeable fuse filesystem structure
3636
type Filesystem struct {
37+
ctx context.Context
38+
3739
dserv dag.DAGService
3840

3941
nsys namesys.NameSystem
@@ -49,6 +51,7 @@ type Filesystem struct {
4951
func NewFilesystem(ctx context.Context, ds dag.DAGService, nsys namesys.NameSystem, pins pin.Pinner, keys ...ci.PrivKey) (*Filesystem, error) {
5052
roots := make(map[string]*KeyRoot)
5153
fs := &Filesystem{
54+
ctx: ctx,
5255
roots: roots,
5356
nsys: nsys,
5457
dserv: ds,
@@ -77,7 +80,7 @@ func (fs *Filesystem) Close() error {
7780
wg.Add(1)
7881
go func(r *KeyRoot) {
7982
defer wg.Done()
80-
err := r.Publish(context.TODO())
83+
err := r.Publish(fs.ctx)
8184
if err != nil {
8285
log.Info(err)
8386
return

0 commit comments

Comments
 (0)