Commit 31d64e6b authored by Juan Batiz-Benet's avatar Juan Batiz-Benet

Merge pull request #1133 from ipfs/fix/ipns-startup

Add timeout to ipns resolution at startup
parents 1d5f68cd 93b06f34
......@@ -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
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment