Fix ServerMonitor not actually removing ServerGroup instances.

This commit is contained in:
md_5 2016-01-17 20:11:25 +11:00
parent 46695f8449
commit 55c54eeff4

View File

@ -206,7 +206,7 @@ public class ServerMonitor
if (groupStatus.getServerType().equalsIgnoreCase("Player"))
{
_repository.removeServerGroup(groupStatus);
_serverGroupMap.remove(groupStatus);
_serverGroupMap.remove(groupStatus.getName());
groupStatusIterator.remove();
System.out.println("Removed MPS : " + groupStatus.getName());
@ -449,7 +449,7 @@ public class ServerMonitor
if (serverGroup != null && serverGroup.getHost() != null && !serverGroup.getHost().isEmpty() && serverGroup.getServerCount() <= 1)
{
_repository.removeServerGroup(serverGroup);
_serverGroupMap.remove(serverGroup);
_serverGroupMap.remove(serverGroup.getName());
_serverGroups.remove(serverGroup);
System.out.println("Removed ServerGroup : " + serverGroup.getName());
}