diff --git a/webhooks/src/main/scala/zio/webhooks/internal/DequeueUtils.scala b/webhooks/src/main/scala/zio/webhooks/internal/DequeueUtils.scala index 03d5162f..8b8a9c1a 100644 --- a/webhooks/src/main/scala/zio/webhooks/internal/DequeueUtils.scala +++ b/webhooks/src/main/scala/zio/webhooks/internal/DequeueUtils.scala @@ -19,7 +19,7 @@ private[webhooks] object DequeueUtils { override def take(implicit trace: Trace): UIO[A] = d.take.flatMap { b => - if (f(b)) ZIO.succeedNow(b) + if (f(b)) ZIO.succeed(b) else take }