Microsoft.AspNet.SignalR.Client.Transports.LongPollingTransport.StopPolling C# (CSharp) Method

StopPolling() private method

Fully stops the polling loop.
private StopPolling ( ) : void
return void
        private void StopPolling()
        {
            lock (_stopLock)
            {
                if (Interlocked.Exchange(ref _running, 0) == 1)
                {
                    _disconnectRegistration.Dispose();

                    // Complete any ongoing calls to Abort()
                    // If someone calls Abort() later, have it no-op
                    AbortHandler.CompleteAbort();

                    if (_currentRequest != null)
                    {
                        // This will no-op if the request is already finished
                        _currentRequest.Abort();
                    }
                }
            }
        }