Skip to content

SignalR Hub request 1 must complete before hub request 2 can run from a single client #9319

@mrrobrob

Description

@mrrobrob

A single client calls a long running hub request, it also needs to call some much faster requests, however the faster requests don't seem to start until the slow request has completed.

To Reproduce

I'm using ASP.NET Core 2.2 and SignalR 1.1.

Hub code is very simple:

   public class TestHub: Hub
    {
        Random r = new Random();
        public async Task SlowTask()
        {
            await Task.Delay(5000);
            await Clients.Caller.SendAsync("slowNumber", r.Next());
        }

        public async Task FastTask()
        {
            await Task.Delay(5);
            await Clients.Caller.SendAsync("fastNumber", r.Next());
        }
    }

Using a single hub conection call the SlowTask, then call the FastTask, fastNumber is not sent back until after SlowTask completes.

Expected behavior

I'd expect FastTask to always finish quickly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions