Skip to content

Commit

Permalink
fix: remove unwanted go routines (#156)
Browse files Browse the repository at this point in the history
Signed-off-by: Vigith Maurice <[email protected]>
  • Loading branch information
vigith authored and BulkBeing committed Sep 30, 2024
1 parent 08ee79d commit bd8cc00
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions pkg/sourcer/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"runtime/debug"
"time"

"golang.org/x/sync/errgroup"
"google.golang.org/protobuf/types/known/emptypb"
"google.golang.org/protobuf/types/known/timestamppb"

Expand Down Expand Up @@ -167,14 +166,9 @@ func (fs *Service) AckFn(stream sourcepb.Source_AckFnServer) error {
}

for {
g, ctx := errgroup.WithContext(ctx)
err := fs.receiveAckRequests(ctx, stream)

g.Go(func() error {
return fs.receiveAckRequests(ctx, stream)
})

// Wait for the goroutines to finish
if err := g.Wait(); err != nil {
if err != nil {
if errors.Is(err, io.EOF) {
return nil
}
Expand Down

0 comments on commit bd8cc00

Please sign in to comment.