We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3e1b010 + 487527f commit ce02b03Copy full SHA for ce02b03
pkg/core/track.go
@@ -139,13 +139,13 @@ func (s *Sender) Start() {
139
}
140
s.done = make(chan struct{})
141
142
- go func() {
143
- // for range on nil chan is OK
144
- for packet := range s.buf {
+ // pass buf directly so that it's impossible for buf to be nil
+ go func(buf chan *Packet) {
+ for packet := range buf {
145
s.Output(packet)
146
147
close(s.done)
148
- }()
+ }(s.buf)
149
150
151
func (s *Sender) Wait() {
0 commit comments