mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-22 10:57:42 +08:00
Add timeout to ipns resolution at startup
This commit is contained in:
parent
1d5f68cdc6
commit
93b06f3469
@ -159,8 +159,10 @@ func (fs *Filesystem) newKeyRoot(parent context.Context, k ci.PrivKey) (*KeyRoot
|
||||
}
|
||||
}
|
||||
|
||||
mnode, err := fs.dserv.Get(ctx, pointsTo)
|
||||
tctx, _ := context.WithTimeout(parent, time.Second*5)
|
||||
mnode, err := fs.dserv.Get(tctx, pointsTo)
|
||||
if err != nil {
|
||||
log.Errorf("Failed to retreive value '%s' for ipns entry: %s\n", pointsTo, err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user