protected void CheckState(object node, EventArgs eargs)
{
lock( _sync ) {
if( IsActive == false ) {
//If we are not active, we do not care what
//our state is.
return;
}
TimeSpan elapsed = DateTime.UtcNow - _last_connection_time;
if( elapsed.TotalSeconds < TRIM_DELAY ) {
return;
}
}
TrimConnections();
if( NeedConnection ) {
//Wake back up and try to get some
Activate();
}
}