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 Sep 23, 2019
1 parent 33c1f22 commit d8599bd
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 d8599bd

Please sign in to comment.