Skip to content

Commit

Permalink
fix: Update internal/js/listener_js.go
Browse files Browse the repository at this point in the history
Co-authored-by: Jerónimo Albi <jeronimo.albi@gmail.com>
  • Loading branch information
x1unix and jeronimoalbi committed Jul 18, 2024
1 parent 56ef7f3 commit 291ff2d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions internal/js/listener_js.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 291ff2d

Please sign in to comment.