Skip to content

Commit

Permalink
Merge pull request #2412 from mpilquist/bugfix/2408
Browse files Browse the repository at this point in the history
Fix memory leak in Channel
  • Loading branch information
SystemFw authored May 20, 2021
2 parents fb1b6f9 + 0b7360a commit bf73c02
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/shared/src/main/scala/fs2/concurrent/Channel.scala
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,8 @@ object Channel {
(
State(values, size, waiting.some, producers, closed),
F.pure(
(Pull.eval(waiting.get) >> consumeLoop).unlessA(closed)
if (closed) Pull.done
else (Pull.eval(waiting.get) >> consumeLoop)
)
)
}
Expand Down

0 comments on commit bf73c02

Please sign in to comment.