From 291ff2d4624721392a9645bad0f8df3ef07ad958 Mon Sep 17 00:00:00 2001 From: Denys Sedchenko Date: Thu, 18 Jul 2024 13:36:10 -0400 Subject: [PATCH] fix: Update internal/js/listener_js.go MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jerónimo Albi --- internal/js/listener_js.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/internal/js/listener_js.go b/internal/js/listener_js.go index 28e1ce6..c6bfad9 100644 --- a/internal/js/listener_js.go +++ b/internal/js/listener_js.go @@ -50,11 +50,9 @@ func registerRequestListener(ctx context.Context) (io.ReadCloser, error) { registerCallback(callbackID) go func() { - select { - case <-chanCtx.Done(): - callback.Release() - close(inputEvents) - } + <-chanCtx.Done() + callback.Release() + close(inputEvents) }() reader := NewChannelReader(inputEvents, cancelFn)