event: add missing unlock before panic

This commit is contained in:
BurtonQin 2020-02-12 16:50:35 +08:00
parent 34bb132b10
commit 1579051fa8

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()