Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mybee
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
mybee
Commits
a0134b3e
Unverified
Commit
a0134b3e
authored
Mar 22, 2021
by
ldeffenb
Committed by
GitHub
Mar 22, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
localstore: missing defers on metrics (#1457)
parent
97420333
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
subscription_pull.go
pkg/localstore/subscription_pull.go
+1
-1
subscription_push.go
pkg/localstore/subscription_push.go
+1
-1
No files found.
pkg/localstore/subscription_pull.go
View file @
a0134b3e
...
@@ -65,7 +65,7 @@ func (db *DB) SubscribePull(ctx context.Context, bin uint8, since, until uint64)
...
@@ -65,7 +65,7 @@ func (db *DB) SubscribePull(ctx context.Context, bin uint8, since, until uint64)
go
func
()
{
go
func
()
{
defer
clean
()
defer
clean
()
defer
db
.
subscritionsWG
.
Done
()
defer
db
.
subscritionsWG
.
Done
()
db
.
metrics
.
SubscribePullStop
.
Inc
()
d
efer
d
b
.
metrics
.
SubscribePullStop
.
Inc
()
// close the returned store.Descriptor channel at the end to
// close the returned store.Descriptor channel at the end to
// signal that the subscription is done
// signal that the subscription is done
defer
close
(
chunkDescriptors
)
defer
close
(
chunkDescriptors
)
...
...
pkg/localstore/subscription_push.go
View file @
a0134b3e
...
@@ -50,7 +50,7 @@ func (db *DB) SubscribePush(ctx context.Context) (c <-chan swarm.Chunk, stop fun
...
@@ -50,7 +50,7 @@ func (db *DB) SubscribePush(ctx context.Context) (c <-chan swarm.Chunk, stop fun
go
func
()
{
go
func
()
{
defer
clean
()
defer
clean
()
defer
db
.
subscritionsWG
.
Done
()
defer
db
.
subscritionsWG
.
Done
()
db
.
metrics
.
SubscribePushIterationDone
.
Inc
()
d
efer
d
b
.
metrics
.
SubscribePushIterationDone
.
Inc
()
// close the returned chunkInfo channel at the end to
// close the returned chunkInfo channel at the end to
// signal that the subscription is done
// signal that the subscription is done
defer
close
(
chunks
)
defer
close
(
chunks
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment