Skip to content

SignalR Stream is will throw when combined with ToObservable from IX.net, and the stream completes. #28241

@arontsang

Description

@arontsang
public class FooHub : Hub
{
    public IAsyncEnumerable<int> Foo()
    {
        return AsyncEnumerable.Empty<int>();
    }
}

public static class Program
{
    public async Task Main()
    {
         await new HubConnectionBuilder()
              .WithUrl(....)
             .Build()
             .StreamAsync(nameof(FooHub.Foo))
             .ToObservable()
            .Do(x => Console.WriteLine(x))
            .ToTask();
    }
}

This will throw an exception of CancellationTokenSource ObjectDisposedException.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-signalrIncludes: SignalR clients and serversbugThis issue describes a behavior which is not expected - a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions