From 9239345c909ecdba66d061bd6d7a78cdf9b605c3 Mon Sep 17 00:00:00 2001 From: Ugnich Anton Date: Sun, 14 Apr 2013 06:43:53 +0700 Subject: socket.close --- src/com/juick/jabber/ws/Main.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/com/juick/jabber/ws') diff --git a/src/com/juick/jabber/ws/Main.java b/src/com/juick/jabber/ws/Main.java index 9107c408..32f3e962 100644 --- a/src/com/juick/jabber/ws/Main.java +++ b/src/com/juick/jabber/ws/Main.java @@ -141,16 +141,19 @@ public class Main implements XmppListener, MessageListener { } else { System.out.println(sChannel.socket().getRemoteSocketAddress().toString() + " INVALID FRAME"); // System.out.println("FOUR"); + sChannel.socket().close(); sChannel.close(); selKey.cancel(); } } else { + sChannel.socket().close(); sChannel.close(); selKey.cancel(); // System.out.println("SIX"); } } catch (IOException e) { System.err.println(e); + sChannel.socket().close(); sChannel.close(); // System.out.println("FIVE"); selKey.cancel(); -- cgit v1.2.3