From 0ab2d04b98d765b24e812686e915a15cdb686ebe Mon Sep 17 00:00:00 2001 From: Boqin Qin Date: Wed, 12 Feb 2020 17:33:31 +0800 Subject: [PATCH] event: add missing unlock before panic (#20653) --- event/feed.go | 1 + 1 file changed, 1 insertion(+) diff --git a/event/feed.go b/event/feed.go index 02f3ca687..33dafe588 100644 --- a/event/feed.go +++ b/event/feed.go @@ -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()