Skip to content

Commit

Permalink
Removed teh destroy function that is never called
Browse files Browse the repository at this point in the history
  • Loading branch information
elecharny committed Apr 9, 2019
1 parent be9e2ba commit 94798f7
Showing 1 changed file with 0 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,9 @@
*/
package org.apache.mina.transport.socket.nio;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.net.SocketException;
import java.nio.channels.ByteChannel;
import java.nio.channels.SelectionKey;
import java.nio.channels.SocketChannel;

import org.apache.mina.core.RuntimeIoException;
Expand Down Expand Up @@ -127,15 +124,6 @@ public InetSocketAddress getLocalAddress() {
return (InetSocketAddress) socket.getLocalSocketAddress();
}

protected void destroy(NioSession session) throws IOException {
ByteChannel ch = session.getChannel();
SelectionKey key = session.getSelectionKey();
if (key != null) {
key.cancel();
}
ch.close();
}

@Override
public InetSocketAddress getServiceAddress() {
return (InetSocketAddress) super.getServiceAddress();
Expand Down

0 comments on commit 94798f7

Please sign in to comment.