Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Commit

Permalink
namesys: set the correct cache TTL on publish
Browse files Browse the repository at this point in the history
  • Loading branch information
Stebalien committed Jan 17, 2020
1 parent 6a45588 commit 3856c6e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions 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 3856c6e

Please sign in to comment.