Unverified Commit 96d98235 authored by Steven Allen's avatar Steven Allen Committed by GitHub

Merge pull request #390 from libp2p/fix/389

metrics: fix memory leak
parents a12e621d 3d68f5bf
...@@ -114,7 +114,7 @@ func (dht *IpfsDHT) handleNewMessage(s network.Stream) bool { ...@@ -114,7 +114,7 @@ func (dht *IpfsDHT) handleNewMessage(s network.Stream) bool {
timer.Reset(dhtStreamIdleTimeout) timer.Reset(dhtStreamIdleTimeout)
startTime := time.Now() startTime := time.Now()
ctx, _ = tag.New( ctx, _ := tag.New(
ctx, ctx,
tag.Upsert(metrics.KeyMessageType, req.GetType().String()), tag.Upsert(metrics.KeyMessageType, req.GetType().String()),
) )
......
...@@ -27,3 +27,5 @@ require ( ...@@ -27,3 +27,5 @@ require (
go.opencensus.io v0.21.0 go.opencensus.io v0.21.0
golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522 golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522
) )
go 1.12
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment