private void CheckIdle() {
// The timer thread is allowed to call this. (It doesn't call user code and doesn't block.)
GlobalLog.ThreadContract(ThreadKinds.Unknown, ThreadKinds.SafeSources | ThreadKinds.Finalization | ThreadKinds.Timer, "Connection#" + ValidationHelper.HashString(this) + "::CheckIdle");
GlobalLog.Print("Connection#" + ValidationHelper.HashString(this) + "::CheckIdle() m_Idle = " + m_Idle + ", BusyCount = " + BusyCount);
if (!m_Idle && this.BusyCount == 0) {
m_Idle = true;
ServicePoint.DecrementConnection();
if (ConnectionGroup != null) {
GlobalLog.Print("Connection#" + ValidationHelper.HashString(this) + "::CheckIdle() - calling ConnectionGoneIdle()");
ConnectionGroup.ConnectionGoneIdle();
}
// Remember the moment when this connection went idle.
m_IdleSinceUtc = DateTime.UtcNow;
}
}