Skip to content

Commit

Permalink
namesys: set the correct cache TTL on publish
Browse files Browse the repository at this point in the history
fixes ipfs/kubo#6656 (comment)


This commit was moved from ipfs/go-namesys@3856c6e
  • Loading branch information
Stebalien committed Jan 17, 2020
1 parent cda470a commit 7166eaf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions namesys/namesys.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,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
}
Expand Down

0 comments on commit 7166eaf

Please sign in to comment.