Remove unnecessary hop (#2136)
This commit is contained in:
parent
bd46d757ba
commit
43fc0854c3
|
|
@ -86,6 +86,7 @@ namespace Microsoft.AspNetCore.SignalR.Client
|
|||
}
|
||||
}
|
||||
|
||||
// If the registered callback blocks it can cause the client to stop receiving messages. If you need to block, get off the current thread first.
|
||||
public IDisposable On(string methodName, Type[] parameterTypes, Func<object[], object, Task> handler, object state)
|
||||
{
|
||||
Log.RegisteringHandler(_logger, methodName);
|
||||
|
|
@ -443,9 +444,6 @@ namespace Microsoft.AspNetCore.SignalR.Client
|
|||
|
||||
private async Task DispatchInvocationAsync(InvocationMessage invocation)
|
||||
{
|
||||
// Make sure we get off the main event loop before we dispatch into user code
|
||||
await AwaitableThreadPool.Yield();
|
||||
|
||||
// Find the handler
|
||||
if (!_handlers.TryGetValue(invocation.Target, out var invocationHandlerList))
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue