From dffafe110135d88c86cdf763206e0ab25c14c717 Mon Sep 17 00:00:00 2001 From: Ian Griffiths Date: Thu, 27 Jul 2023 14:21:57 +0100 Subject: [PATCH] Fix AsyncObservable.DeferAsync infinite recursion (#1979) The DeferAsync methods are meant to just call into the equivalent Defer methods. (I don't know why we have both, but I'm guessing that DeferAsync might be useful in cases where you want the compiler to infer the delegate type. With just Defer, it might be unclear whether you mean the one where the factory returns an observable, or the one where the factory returns a value task that produces an observable.) --- AsyncRx.NET/System.Reactive.Async/Linq/Operators/Defer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Defer.cs b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Defer.cs index 875ab6e849..ee220795b3 100644 --- a/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Defer.cs +++ b/AsyncRx.NET/System.Reactive.Async/Linq/Operators/Defer.cs @@ -43,7 +43,7 @@ public static IAsyncObservable Defer(Func DeferAsync(Func>> observableFactory) => DeferAsync(observableFactory); + public static IAsyncObservable DeferAsync(Func>> observableFactory) => Defer(observableFactory); public static IAsyncObservable Defer(Func>> observableFactory) {