Skip to content

I think I find a bug when I read source code of feed.go in package event. #16580

@jameszo

Description

@jameszo

The line 172 to 174 in feed.go of package event which are codes of method Send(value interface{}):

if index >= 0 && index < len(cases) {
    cases = f.sendCases[:len(cases)-1]
}

I think it`s not right, and should be like this:

index = cases.find(recv.Interface())
cases = cases.delete(index)

So that the cases left are the chans which will be TrySend again.

This a doubt when I read the code. Please tell me why if what I thought is wrong. Thanks!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions