From e1047f5be1d2115c0a8ddc9af04e6d6c848c7646 Mon Sep 17 00:00:00 2001 From: Ian Griffiths Date: Tue, 25 Jul 2023 08:33:22 +0100 Subject: [PATCH] Fix AsyncObservable.DeferAsync infinite recursion 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) {