Merge branch 'master' of ssh://184.154.0.242:7999/min/Mineplex

This commit is contained in:
Cheese 2015-10-13 23:22:58 +11:00
commit 1842eae7f0

View File

@ -312,21 +312,28 @@ public class ServerMonitor
while (_processes.size() > 0)
{
for (Iterator<ProcessRunner> iterator = _processes.iterator(); iterator.hasNext();)
try
{
ProcessRunner pr = iterator.next();
try
for (Iterator<ProcessRunner> iterator = _processes.iterator(); iterator.hasNext();)
{
pr.join(100);
}
catch (InterruptedException e)
{
e.printStackTrace();
ProcessRunner pr = iterator.next();
try
{
pr.join(100);
}
catch (InterruptedException e)
{
e.printStackTrace();
}
if (pr.isDone())
iterator.remove();
}
if (pr.isDone())
iterator.remove();
}
catch (Exception ex)
{
ex.printStackTrace();
}
if (_processes.size() > 0)
@ -342,7 +349,7 @@ public class ServerMonitor
}
}
if (processWaits >= 10)
if (processWaits >= 5)
{
log("Killing stale processes.");
@ -351,6 +358,8 @@ public class ServerMonitor
iterator.next().abort();
iterator.remove();
}
_processes.clear();
}
processWaits++;