Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mrrobrob opened this issue Apr 12, 2019 · 1 comment

Comments

@mrrobrob
Copy link

mrrobrob commented Apr 12, 2019

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.

@davidfowl
Copy link
Member

Duplicate of #5351

@davidfowl davidfowl marked this as a duplicate of #5351 Apr 12, 2019
@ghost ghost locked as resolved and limited conversation to collaborators Dec 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants