aspnet / SignalR-Client-Net

OBSOLETE - see readme

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot call Start from Connection.StateChanged handler in .NET client

DamianEdwards opened this issue · comments

From SignalR/SignalR#2956

The issue here is that we invoke the StateChanged before the client is actually disconnected. This is causing a race condition where Start() initializes state which is subsequently broken by remaining Disconnect() activities (most notably the _disconnectCts initialized by Start() is then disposed in Disconnect() and causes the ObjectDisposedException when being accessed).