From e0a0f0fce2bd2e3b4c8f68daa55a094f0acd8a2d Mon Sep 17 00:00:00 2001 From: kciesielski Date: Thu, 9 Nov 2023 09:06:01 +0100 Subject: [PATCH] Fix how blocking is implemented in CatsMonadAsyncError --- .../scala/sttp/client4/impl/cats/CatsMonadAsyncError.scala | 3 +++ 1 file changed, 3 insertions(+) diff --git a/effects/cats/src/main/scala/sttp/client4/impl/cats/CatsMonadAsyncError.scala b/effects/cats/src/main/scala/sttp/client4/impl/cats/CatsMonadAsyncError.scala index 24b56741be..d58959e93a 100644 --- a/effects/cats/src/main/scala/sttp/client4/impl/cats/CatsMonadAsyncError.scala +++ b/effects/cats/src/main/scala/sttp/client4/impl/cats/CatsMonadAsyncError.scala @@ -8,4 +8,7 @@ import sttp.monad.{Canceler, MonadAsyncError} class CatsMonadAsyncError[F[_]](implicit F: Async[F]) extends CatsMonadError[F] with MonadAsyncError[F] { override def async[T](register: ((Either[Throwable, T]) => Unit) => Canceler): F[T] = F.async(cb => F.delay(register(cb)).map(c => F.delay(c.cancel()).some)) + + override def blocking[T](t: => T): F[T] = + F.blocking(t) }