Commit d8599bd1 authored by Steven Allen's avatar Steven Allen

namesys: set the correct cache TTL on publish

fixes https://github.com/ipfs/go-ipfs/issues/6656#issuecomment-534252128
parent 33c1f224
......@@ -191,6 +191,9 @@ func (ns *mpns) PublishWithEOL(ctx context.Context, name ci.PrivKey, value path.
return err
}
ttl := DefaultResolverCacheTTL
if setTTL, ok := checkCtxTTL(ctx); ok {
ttl = setTTL
}
if ttEol := time.Until(eol); ttEol < ttl {
ttl = ttEol
}
......
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