Skip to content

Commit 9a348c6

Browse files
committed
grpcsync: don't check ok which can never be false
1 parent 3e68f0b commit 9a348c6

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

internal/grpcsync/callback_serializer.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,7 @@ func (cs *CallbackSerializer) run(ctx context.Context) {
8484
case <-ctx.Done():
8585
// Do nothing here. Next iteration of the for loop will not happen,
8686
// since ctx.Err() would be non-nil.
87-
case callback, ok := <-cs.callbacks.Get():
88-
if !ok {
89-
return
90-
}
87+
case callback := <-cs.callbacks.Get():
9188
cs.callbacks.Load()
9289
callback.(func(ctx context.Context))(ctx)
9390
}

0 commit comments

Comments
 (0)