Skip to content

Commit

Permalink
Merge pull request #676 from ipfs/fix/cancelled-context-repo-stat
Browse files Browse the repository at this point in the history
Fix context cancelled too early.
  • Loading branch information
hsanjuan committed Feb 17, 2019
2 parents d49884b + 72d4179 commit dcd8bb8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ipfsconn/ipfshttp/ipfshttp.go
Original file line number Diff line number Diff line change
Expand Up @@ -683,8 +683,9 @@ func (ipfs *Connector) shouldUpdateMetric() bool {

// Trigger a broadcast of the local informer metrics.
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()
ctx = trace.NewContext(ipfs.ctx, span)

if !ipfs.shouldUpdateMetric() {
return nil
Expand Down

0 comments on commit dcd8bb8

Please sign in to comment.