internal void FinishOwningDisconnectHandling() { // If it got disconnected, run the disconnect code. if (Interlocked.CompareExchange(ref _ownershipState, 0, 1) == 2) { HandleDisconnect(); } }