From 8a4c15dde29d08ce67882b284457274642cf760a Mon Sep 17 00:00:00 2001 From: Juan Batiz-Benet Date: Tue, 28 Jul 2015 23:57:51 -0700 Subject: [PATCH] ipnsfs: remove context.TODO(), wire to FS context License: MIT Signed-off-by: Juan Batiz-Benet --- ipnsfs/system.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ipnsfs/system.go b/ipnsfs/system.go index f69622729..ff6cd3721 100644 --- a/ipnsfs/system.go +++ b/ipnsfs/system.go @@ -34,6 +34,8 @@ var ErrIsDirectory = errors.New("error: is a directory") // Filesystem is the writeable fuse filesystem structure type Filesystem struct { + ctx context.Context + dserv dag.DAGService nsys namesys.NameSystem @@ -49,6 +51,7 @@ type Filesystem struct { func NewFilesystem(ctx context.Context, ds dag.DAGService, nsys namesys.NameSystem, pins pin.Pinner, keys ...ci.PrivKey) (*Filesystem, error) { roots := make(map[string]*KeyRoot) fs := &Filesystem{ + ctx: ctx, roots: roots, nsys: nsys, dserv: ds, @@ -77,7 +80,7 @@ func (fs *Filesystem) Close() error { wg.Add(1) go func(r *KeyRoot) { defer wg.Done() - err := r.Publish(context.TODO()) + err := r.Publish(fs.ctx) if err != nil { log.Info(err) return