Commit b941a19d authored by Costin Grigoras's avatar Costin Grigoras
Browse files

Clean up unused parts

parent 8273043a
...@@ -10,7 +10,6 @@ import java.io.PipedOutputStream; ...@@ -10,7 +10,6 @@ import java.io.PipedOutputStream;
import java.net.Inet6Address; import java.net.Inet6Address;
import java.net.InetSocketAddress; import java.net.InetSocketAddress;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import java.nio.channels.ClosedChannelException;
import java.nio.channels.SelectionKey; import java.nio.channels.SelectionKey;
import java.nio.channels.Selector; import java.nio.channels.Selector;
import java.nio.channels.ServerSocketChannel; import java.nio.channels.ServerSocketChannel;
...@@ -256,7 +255,7 @@ public class DispatchSSLServerNIO implements Runnable { ...@@ -256,7 +255,7 @@ public class DispatchSSLServerNIO implements Runnable {
return remoteIdentity != null; return remoteIdentity != null;
} }
private void notifyData() throws IOException { private void notifyData() {
// System.err.println("Handling data notification"); // System.err.println("Handling data notification");
if (isKilled.get()) if (isKilled.get())
...@@ -532,14 +531,14 @@ public class DispatchSSLServerNIO implements Runnable { ...@@ -532,14 +531,14 @@ public class DispatchSSLServerNIO implements Runnable {
if (key == null || !key.isValid()) { if (key == null || !key.isValid()) {
logger.log(Level.INFO, "Detected closed key, disposing of it"); logger.log(Level.INFO, "Detected closed key, disposing of it");
if (key != null){ if (key != null) {
final DispatchSSLServerNIO obj = sessionMap.remove(key); final DispatchSSLServerNIO obj = sessionMap.remove(key);
if (obj!=null){ if (obj != null) {
try{ try {
obj.cleanup(); obj.cleanup();
} }
catch (final Throwable t){ catch (final Throwable t) {
logger.log(Level.WARNING, "Cleaning up an invalid key encountered a problem", t); logger.log(Level.WARNING, "Cleaning up an invalid key encountered a problem", t);
} }
} }
...@@ -561,12 +560,12 @@ public class DispatchSSLServerNIO implements Runnable { ...@@ -561,12 +560,12 @@ public class DispatchSSLServerNIO implements Runnable {
try { try {
obj.notifyData(); obj.notifyData();
} }
catch (final Throwable t1){ catch (final Throwable t1) {
try { try {
logger.log(Level.WARNING, "Throwable notifying data", t1); logger.log(Level.WARNING, "Throwable notifying data", t1);
obj.cleanup(); obj.cleanup();
} }
catch (final Throwable t){ catch (final Throwable t) {
logger.log(Level.WARNING, "Cleaning up after an error encountered a problem", t); logger.log(Level.WARNING, "Cleaning up after an error encountered a problem", t);
} }
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment