void threadStart()
{
while (true)
{
var time = DateTime.Now.AddMinutes(-10);
lock (lockObj)
{
if (Connections.Count() > minConnections)
{
var all = Connections.FindAll(b => b.LastUseTime < time);
foreach (var item in all)
{
item.Socket.Dispose();
Connections.Remove(item);
}
}
}
System.Threading.Thread.Sleep(1000 * 10);
}
}