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@ac0ea1a
  • Loading branch information
Stebalien committed Sep 23, 2019
1 parent b76f3a3 commit 75eba40
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 @@ -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
}
Expand Down

0 comments on commit 75eba40

Please sign in to comment.