diff --git a/modules/core/src/main/scala/fs2/kafka/KafkaProducer.scala b/modules/core/src/main/scala/fs2/kafka/KafkaProducer.scala index 2d38059e0..74638994e 100644 --- a/modules/core/src/main/scala/fs2/kafka/KafkaProducer.scala +++ b/modules/core/src/main/scala/fs2/kafka/KafkaProducer.scala @@ -190,7 +190,7 @@ object KafkaProducer { Async[F] .race( Async[F] - .fromFutureCancelable(Async[F].delay(produceRecordError.future, Async[F].unit)), + .fromFutureCancelable(Async[F].delay((produceRecordError.future, Async[F].unit))), produceRecords(produceRecordError.some) ) .rethrow diff --git a/modules/core/src/main/scala/fs2/kafka/TransactionalKafkaProducer.scala b/modules/core/src/main/scala/fs2/kafka/TransactionalKafkaProducer.scala index 6c23a15ae..58ef259a7 100644 --- a/modules/core/src/main/scala/fs2/kafka/TransactionalKafkaProducer.scala +++ b/modules/core/src/main/scala/fs2/kafka/TransactionalKafkaProducer.scala @@ -163,7 +163,7 @@ object TransactionalKafkaProducer { Async[F] .race( Async[F].fromFutureCancelable( - Async[F].delay(produceRecordError.future, Async[F].unit) + Async[F].delay((produceRecordError.future, Async[F].unit)) ), produceRecords(produceRecordError.some) )