1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-09-09 23:42:20 +08:00

Replace WithTimeout with WithCancel whenever possible

License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
This commit is contained in:
rht
2015-08-17 15:40:48 +07:00
parent d32177cda0
commit 5d8e15042f
10 changed files with 12 additions and 23 deletions

View File

@ -87,7 +87,7 @@ func (s *Resolver) ResolvePathComponents(ctx context.Context, fpath Path) ([]*me
}
log.Debug("Resolve dag get.")
ctx, cancel := context.WithTimeout(ctx, time.Minute)
ctx, cancel := context.WithCancel(ctx)
defer cancel()
nd, err := s.DAG.Get(ctx, key.Key(h))
if err != nil {