send out to every client fix

This commit is contained in:
hba56
2017-09-13 12:59:49 +12:00
parent 5fb24307ec
commit 2c06a46ad2
3 changed files with 11 additions and 10 deletions
@@ -57,9 +57,10 @@ public class NetworkInterface {
public void run() {
List<HostGame> games = new ArrayList<>();
for(ClientAddress address: clientsAddresses) {
HostGame game = matchTable.getMatchTable().get(address);
for(Map.Entry<ClientAddress, HostGame> tableEntry: matchTable.getMatchTable().entrySet()) {
HostGame game = tableEntry.getValue();
if(game != null) {
System.out.println(game.getIp());
games.add(game);
}
}