You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by el...@apache.org on 2019/04/12 08:22:06 UTC

[mina] 02/02: Removed teh destroy function that is never called

This is an automated email from the ASF dual-hosted git repository.

elecharny pushed a commit to branch 2.0
in repository https://gitbox.apache.org/repos/asf/mina.git

commit 94798f729dadbdb161268b18e00a8101945247d0
Author: emmanuel lecharny <el...@apache.org>
AuthorDate: Tue Apr 9 10:18:09 2019 +0200

    Removed teh destroy function that is never called
---
 .../apache/mina/transport/socket/nio/NioSocketSession.java   | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/mina-core/src/main/java/org/apache/mina/transport/socket/nio/NioSocketSession.java b/mina-core/src/main/java/org/apache/mina/transport/socket/nio/NioSocketSession.java
index 0208e3f..025bf08 100644
--- a/mina-core/src/main/java/org/apache/mina/transport/socket/nio/NioSocketSession.java
+++ b/mina-core/src/main/java/org/apache/mina/transport/socket/nio/NioSocketSession.java
@@ -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;
@@ -127,15 +124,6 @@ class NioSocketSession extends NioSession {
         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();