Skip to content

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 721c1ab commit 36c0cbf
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 36c0cbf

Please sign in to comment.