Skip to content

Commit

Permalink
Review comments
Browse files Browse the repository at this point in the history
Signed-off-by: joshvanl <[email protected]>
  • Loading branch information
JoshVanL committed Jan 6, 2025
1 parent 2ff5f1a commit 7782ed1
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions events/broadcaster/broadcaster.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ package broadcaster

import (
"context"
"fmt"
"sync"
"sync/atomic"
)
Expand Down Expand Up @@ -92,12 +91,7 @@ func (b *Broadcaster[T]) subscribe(ctx context.Context, ch chan<- T) {
return
case <-b.closeCh:
return
case env := <-bufferedCh:
select {
case ch <- env:
case <-ctx.Done():
case <-b.closeCh:
}
case ch <- <-bufferedCh:
}
}
}()
Expand Down Expand Up @@ -125,7 +119,6 @@ func (b *Broadcaster[T]) Close() {
defer b.wg.Wait()
b.lock.Lock()
if b.closed.CompareAndSwap(false, true) {
fmt.Printf(">>HERE!!!!\n")
close(b.closeCh)
}
b.lock.Unlock()
Expand Down

0 comments on commit 7782ed1

Please sign in to comment.