Merge pull request #676 from ipfs/fix/cancelled-context-repo-stat
Fix context cancelled too early.
This commit is contained in:
commit
dcd8bb85d1
|
@ -683,8 +683,9 @@ func (ipfs *Connector) shouldUpdateMetric() bool {
|
||||||
|
|
||||||
// Trigger a broadcast of the local informer metrics.
|
// Trigger a broadcast of the local informer metrics.
|
||||||
func (ipfs *Connector) updateInformerMetric(ctx context.Context) error {
|
func (ipfs *Connector) updateInformerMetric(ctx context.Context) error {
|
||||||
ctx, span := trace.StartSpan(ctx, "ipfsconn/ipfshttp/updateInformerMetric")
|
_, span := trace.StartSpan(ctx, "ipfsconn/ipfshttp/updateInformerMetric")
|
||||||
defer span.End()
|
defer span.End()
|
||||||
|
ctx = trace.NewContext(ipfs.ctx, span)
|
||||||
|
|
||||||
if !ipfs.shouldUpdateMetric() {
|
if !ipfs.shouldUpdateMetric() {
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue
Block a user