event: add missing unlock before panic (#20653)

This commit is contained in:
Daniel Liu 2024-08-27 06:25:54 +08:00 committed by Daniel Liu
parent 3a51e7573c
commit 06d64ff298

View file

@ -138,6 +138,7 @@ func (f *Feed) Send(value interface{}) (nsent int) {
if !f.typecheck(rvalue.Type()) {
f.sendLock <- struct{}{}
f.mu.Unlock()
panic(feedTypeError{op: "Send", got: rvalue.Type(), want: f.etype})
}
f.mu.Unlock()