diff --git a/core/shared/src/main/scala/fs2/Stream.scala b/core/shared/src/main/scala/fs2/Stream.scala index 854a34e095..1dafcad0c8 100644 --- a/core/shared/src/main/scala/fs2/Stream.scala +++ b/core/shared/src/main/scala/fs2/Stream.scala @@ -1925,7 +1925,7 @@ final class Stream[+F[_], +O] private[fs2] (private[fs2] val underlying: Pull[F, // We need to use `attempt` because `interruption` may already be completed. val signalInterruption: F2[Unit] = interrupt.complete(()).void - def go(s: Stream[F2, O2], guard: Semaphore[F2]): Pull[F2, O2, Unit] = + def go(s: Stream[F2, O2], guard: Semaphore[F2]): Pull[F2, Nothing, Unit] = Pull.eval(guard.acquire) >> s.pull.uncons.flatMap { case Some((hd, tl)) => val send = resultChan.send(Stream.chunk(hd).onFinalize(guard.release))