From 718393f1a6d2ad9d60e530f7bd644c76547a8390 Mon Sep 17 00:00:00 2001 From: Calle Lejdbrandt Date: Tue, 5 Jun 2012 12:29:01 +0200 Subject: [PATCH] Fix --- src/cnt/network/ConnectionNetworking.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/cnt/network/ConnectionNetworking.java b/src/cnt/network/ConnectionNetworking.java index b59d92a..62b4691 100644 --- a/src/cnt/network/ConnectionNetworking.java +++ b/src/cnt/network/ConnectionNetworking.java @@ -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]); } } }