Commit a0134b3e authored by ldeffenb's avatar ldeffenb Committed by GitHub

localstore: missing defers on metrics (#1457)

parent 97420333
......@@ -65,7 +65,7 @@ func (db *DB) SubscribePull(ctx context.Context, bin uint8, since, until uint64)
go func() {
defer clean()
defer db.subscritionsWG.Done()
db.metrics.SubscribePullStop.Inc()
defer db.metrics.SubscribePullStop.Inc()
// close the returned store.Descriptor channel at the end to
// signal that the subscription is done
defer close(chunkDescriptors)
......
......@@ -50,7 +50,7 @@ func (db *DB) SubscribePush(ctx context.Context) (c <-chan swarm.Chunk, stop fun
go func() {
defer clean()
defer db.subscritionsWG.Done()
db.metrics.SubscribePushIterationDone.Inc()
defer db.metrics.SubscribePushIterationDone.Inc()
// close the returned chunkInfo channel at the end to
// signal that the subscription is done
defer close(chunks)
......
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