C# client Stop can take a while if it spams Sends then tries to Stop
Open
affected-very-few
area-signalr
enhancement
Perf
severity-nice-to-have
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 276
Description
```
while (someCondition == false)
{
_ = hubConnection.SendAsync("Ping");
}
// Takes a long time to complete
hubConnection.StopAsync();
// or
hubConnection.DisposeAsync();
```
The `SendAsync`'s are all waiting on a lock and when `StopAsync/DisposeAsync` tries to run it waits on the same lock. And I've observed it taking over a minute for the Stop/Dispose to finish
Contributor guide
Assessment
This issue has not been assessed yet.