event: add missing unlock before panic (#20653)

pull/20932/head^2
Boqin Qin 5 years ago committed by GitHub
parent 8045504abf
commit 1821328162
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      event/feed.go

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

Loading…
Cancel
Save