Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Calle Lejdbrandt committed Jun 5, 2012
1 parent 4cbc584 commit 718393f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/cnt/network/ConnectionNetworking.java
Expand Up @@ -543,8 +543,14 @@ public void send(final Packet packet, final ObjectOutputStream output)
else
{
System.out.println("\033[1;31mError routing message to [" + sendToID[i] + "]: Skipping, he will get it in the full update he gets when he reconnects\033[21;39m");
if (sendToID[i] < this.localID)
this.reconnect(sendToID[i]);
try
{
this.sockets.get(sendToID[i]).close();
} catch (Exception err) {
System.err.println("\033[1;33miConnectionNetworking: Couldn't close socket on faulty connection\033[0m");
}
this.sockets.remove(sendToID[i]);
this.outputs.remove(sendToID[i]);
}
}
}
Expand Down

0 comments on commit 718393f

Please sign in to comment.