From c07edb1067d5aae8d2ba1b9f235301df57dceadd Mon Sep 17 00:00:00 2001 From: Daniel Liu Date: Tue, 27 Aug 2024 06:25:54 +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 b8ebac92ce69..b220d59db0c7 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()