Skip to content

Commit

Permalink
Close the r.proceed channel
Browse files Browse the repository at this point in the history
Signed-off-by: Gabriel Adrian Samfira <[email protected]>
  • Loading branch information
gabriel-samfira committed Feb 27, 2023
1 parent e79beb3 commit b2acd4e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/wclayer/baselayerreader.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,12 @@ func (r *baseLayerReader) Read(b []byte) (int, error) {

func (r *baseLayerReader) Close() (err error) {
defer r.s.End()
defer func() { oc.SetSpanStatus(r.s, err) }()
defer func() {
oc.SetSpanStatus(r.s, err)
close(r.proceed)
}()
r.proceed <- false
// The r.result channel will be closed once walk() returns
<-r.result
r.reset()
return nil
Expand Down

0 comments on commit b2acd4e

Please sign in to comment.