Skip to content

Commit

Permalink
metrics: fix memory leak
Browse files Browse the repository at this point in the history
fixes ipfs#389

Credit goes to @sidenaio for finding this.
  • Loading branch information
Stebalien committed Sep 4, 2019
1 parent a12e621 commit 3d68f5b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dht_net.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func (dht *IpfsDHT) handleNewMessage(s network.Stream) bool {
timer.Reset(dhtStreamIdleTimeout)

startTime := time.Now()
ctx, _ = tag.New(
ctx, _ := tag.New(
ctx,
tag.Upsert(metrics.KeyMessageType, req.GetType().String()),
)
Expand Down
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@ require (
go.opencensus.io v0.21.0
golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522
)

go 1.12

0 comments on commit 3d68f5b

Please sign in to comment.