void ConnectionComplete(ConnectionContext connectionContext) { connectionContext.End(); int count = Interlocked.Decrement(ref _connectionCount); if (_closing) { if (count == 0) ShutdownListener(); } }