fixed an issue in Main, where a leaving node wasnt removed from the Node-list
This commit is contained in:
parent
8062d73901
commit
939bfd3a38
@ -49,7 +49,9 @@ public class Main {
|
||||
nodes.put(newNodeName, newNode);
|
||||
break;
|
||||
case "leave":
|
||||
nodes.get(node).leave();
|
||||
Node theNode = nodes.get(node);
|
||||
theNode.leave();
|
||||
nodes.remove(theNode);
|
||||
break;
|
||||
default:
|
||||
System.out.println("Unknown command.");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user