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
36c0cbf4e17cafc3d0f0aeb5bbb362cb41de3d8b
1 file changed
+3
namesys/namesys.go
+3
@@ -183,6 +183,9 @@ func (ns *mpns) PublishWithEOL(ctx context.Context, name ci.PrivKey, value path.
183
return err
184
}
185
ttl := DefaultResolverCacheTTL
186
+ if setTTL, ok := checkCtxTTL(ctx); ok {
187
+ ttl = setTTL
188
+ }
189
if ttEol := time.Until(eol); ttEol < ttl {
190
ttl = ttEol
191
}