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:
@ -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 {
|
||||
|
Reference in New Issue
Block a user