SignalR/SignalR — pull request #2867 by i-e-b (2014-02-07 15:46:22+00:00)
Title: Async call back from proxy.On<>(...) to fix a dead-lock issue

Hi.

As mentioned in #2153, there is a case of potential deadlock. A potential 1-line fix is here in `HubProxyExtensions.cs`.

I tried add an appropriate unit test, but using mocks I couldn't reproduce; using real connections ended up with an unreadable tangle of a test.

I've added an example in `samples/Microsoft.AspNet.SignalR.Client40.Samples/Client.cs` that dead-locks without the change, and runs smoothly without.

A disadvantage is that two of the `HubProxyFacts.cs` tests are no longer single-threaded and require a small sleep to pass.

Thanks,
Iain B.