diff --git a/README.md b/README.md index 78d1c2d..6be2b5f 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ This library provides an interoperability layer between ZIO and reactive streams In order to use this library, we need to add the following line in our `build.sbt` file: ```scala -libraryDependencies += "dev.zio" %% "zio-interop-reactive-streams" % "2.0.0" +libraryDependencies += "dev.zio" %% "zio-interop-reactive-streams" % "2.0.1" ``` ## Examples diff --git a/zio-interop-reactivestreams/src/main/scala/zio/interop/reactivestreams/Adapters.scala b/zio-interop-reactivestreams/src/main/scala/zio/interop/reactivestreams/Adapters.scala index 22e1efe..c0859cf 100644 --- a/zio-interop-reactivestreams/src/main/scala/zio/interop/reactivestreams/Adapters.scala +++ b/zio-interop-reactivestreams/src/main/scala/zio/interop/reactivestreams/Adapters.scala @@ -45,7 +45,7 @@ object Adapters { error <- Promise.make[E, Nothing] subscription = new DemandTrackingSubscription(sub) _ <- ZIO.succeed(sub.onSubscribe(subscription)) - fiber <- error.await.catchAll(t => ZIO.succeed(sub.onError(t))).forkScoped + fiber <- error.await.interruptible.catchAll(t => ZIO.succeed(sub.onError(t))).forkScoped } yield (error.fail(_) *> fiber.join, demandUnfoldSink(sub, subscription)) }