internal void CloseOnIdle() {
// 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.Timer, "Connection#" + ValidationHelper.HashString(this) + "::CloseOnIdle");
lock(this){
m_KeepAlive = false;
m_RemovedFromConnectionList = true;
if (!m_Idle)
{
CheckIdle();
}
if (m_Idle)
{
AbortSocket(false);
GC.SuppressFinalize(this);
}
}
}