Skip to content

Commit

Permalink
Remove unnecessary wait group
Browse files Browse the repository at this point in the history
  • Loading branch information
aopoltorzhicky committed Sep 14, 2024
1 parent 10c3dff commit e367800
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions pkg/indexer/indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ package indexer

import (
"context"
"sync"

"github.com/dipdup-net/indexer-sdk/pkg/modules/stopper"

Expand Down Expand Up @@ -36,7 +35,6 @@ type Indexer struct {
rollback *rollback.Module
genesis *genesis.Module
stopper modules.Module
wg *sync.WaitGroup
log zerolog.Logger
}

Expand Down Expand Up @@ -85,7 +83,6 @@ func New(ctx context.Context, cfg config.Config, stopperModule modules.Module) (
rollback: rb,
genesis: genesisModule,
stopper: stopperModule,
wg: new(sync.WaitGroup),
log: log.With().Str("module", "indexer").Logger(),
}, nil
}
Expand All @@ -101,7 +98,6 @@ func (i *Indexer) Start(ctx context.Context) {

func (i *Indexer) Close() error {
i.log.Info().Msg("closing...")
i.wg.Wait()

if err := i.receiver.Close(); err != nil {
log.Err(err).Msg("closing receiver")
Expand Down

0 comments on commit e367800

Please sign in to comment.