namesys: set the correct cache TTL on publish
fixes https://github.com/ipfs/go-ipfs/issues/6656#issuecomment-534252128
Steven Allen committed
Sep 23, 2019 at 14:05 UTC
d8599bd1089cbee5e4596d7a6906edecd36fe33c
1 file changed
+3
namesys/namesys.go
+3
@@ -191,6 +191,9 @@ func (ns *mpns) PublishWithEOL(ctx context.Context, name ci.PrivKey, value path.
191
return err
192
}
193
ttl := DefaultResolverCacheTTL
194
+ if setTTL, ok := checkCtxTTL(ctx); ok {
195
+ ttl = setTTL
196
+ }
197
if ttEol := time.Until(eol); ttEol < ttl {
198
ttl = ttEol
199
}