Skip to content

Commit

Permalink
fix: fix unbuffered channel blocking goroutine (#358)
Browse files Browse the repository at this point in the history
Signed-off-by: James Milligan <james@omnant.co.uk>

<!-- Please use this template for your pull request. -->
<!-- Please use the sections that you need and delete other sections -->

## This PR
<!-- add the description of the PR here -->

- buffers channel on startup to prevent blocking in linked issue

### Related Issues
<!-- add here the GitHub issue that this PR resolves if applicable -->

#356

### Notes
<!-- any additional notes for this PR -->

### Follow-up Tasks
<!-- anything that is related to this PR but not done here should be
noted under this section -->
<!-- if there is a need for a new issue, please link it here -->

### How to test
<!-- if applicable, add testing instructions under this section -->

Signed-off-by: James Milligan <james@omnant.co.uk>
  • Loading branch information
james-milligan authored Feb 1, 2023
1 parent a048750 commit 4f1905a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/runtime/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (r *Runtime) Start() error {
defer cancel()

g, gCtx := errgroup.WithContext(ctx)
dataSync := make(chan sync.DataSync)
dataSync := make(chan sync.DataSync, len(r.SyncImpl))

// Initialize DataSync channel watcher
g.Go(func() error {
Expand Down

0 comments on commit 4f1905a

Please sign in to comment.