private static void ConnectionMonitor() {
while(! s_ShutdownEvent.WaitOne(DefaultTickValue, false)) {
if (GlobalLog.EnableMonitorThread) {
}
int hungCount = 0;
lock (s_RequestList) {
DateTime dateNow = DateTime.Now;
DateTime dateExpired = dateNow.AddSeconds(-DefaultTickValue);
foreach (ConnectionMonitorEntry monitorEntry in s_RequestList.GetValueList() ) {
if (monitorEntry != null &&
(dateExpired > monitorEntry.m_TimeAdded))
{
hungCount++;
monitorEntry.m_Connection.Debug(monitorEntry.m_Request.GetHashCode());
}
}
}
Assert(hungCount == 0, "Warning: Hang Detected on Connection(s) of greater than {0} ms. {1} request(s) hung.|Please Dump System.Net.GlobalLog.s_RequestList for pending requests, make sure your streams are calling Close(), and that your destination server is up.", DefaultTickValue, hungCount);
}
}
#endif // DEBUG