Exemplo n.º 1
0
        internal void DecrementConnection()
        {
            // we need these to be atomic operations
            lock (m_ConnectionList) {
                m_ActiveConnections--;
                if (m_ActiveConnections == 0)
                {
                    Diagnostics.Debug.Assert(m_ExpiringTimer == null, "Timer not cleared");

                    m_ExpiringTimer = ServicePoint.CreateConnectionGroupTimer(this);
                }
                else if (m_ActiveConnections < 0)
                {
                    m_ActiveConnections = 0;
                    Diagnostics.Debug.Assert(false, "ConnectionGroup; Too many decrements.");
                }
            }
        }