System.Net.ConnectionGroup.PruneExcesiveConnections C# (CSharp) Method

PruneExcesiveConnections() private method

private PruneExcesiveConnections ( ) : void
return void
        private void PruneExcesiveConnections() {
            lock(m_ConnectionList) {
                int connectionLimit = ConnectionLimit;
                if (CurrentConnections > connectionLimit) {
                    int numberToPrune = CurrentConnections - connectionLimit;
                    for (int i=0; i<numberToPrune; i++) {
                        ((Connection)m_ConnectionList[i]).CloseOnIdle();
                    }
                    m_ConnectionList.RemoveRange(0, numberToPrune);
                }
            }
        }