From 18213281627b310ac68d22bca7c401ab5f67e1da 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 02f3ca6875..33dafe5886 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()