aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Ugnich Anton2013-04-14 06:43:53 +0700
committerGravatar Ugnich Anton2013-04-14 06:43:53 +0700
commit9239345c909ecdba66d061bd6d7a78cdf9b605c3 (patch)
tree536f8681302cba780d2e7a94aecbe4dbf0884269
parent1c70f9be446a5002d33e18f344429f3b75cb3a48 (diff)
socket.close
-rw-r--r--nbproject/project.properties3
-rw-r--r--src/com/juick/jabber/ws/Main.java3
2 files changed, 5 insertions, 1 deletions
diff --git a/nbproject/project.properties b/nbproject/project.properties
index 9b3f6bc4..8858bd3a 100644
--- a/nbproject/project.properties
+++ b/nbproject/project.properties
@@ -31,7 +31,8 @@ jar.compress=false
javac.classpath=\
${reference.com_juick_xmpp.jar}:\
${reference.com_juick_server.jar}:\
- ${reference.com_juick.jar}
+ ${reference.com_juick.jar}:\
+ ${libs.MySQLDriver.classpath}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
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();