/// <summary> /// The logic of the thread. /// </summary> private void Maintain() { while (!_stopThread) { try { Thread.Sleep((int)_interval); // if pool is initialized, then // run the maintenance method on itself if (_pool.Initialized) { _pool.SelfMaintain(); } } catch (ThreadInterruptedException) { } //MaxM: When SockIOPool.getInstance().shutDown() is called, this exception will be raised and can be safely ignored. catch//(Exception ex) { //if(Log.IsErrorEnabled) //{ // Log.Error(GetLocalizedString("maintenance thread choked"), ex); //} } } }