diff --git a/src/org/redkale/net/TcpNioAsyncConnection.java b/src/org/redkale/net/TcpNioAsyncConnection.java index 744c2242b..fb3f0310a 100644 --- a/src/org/redkale/net/TcpNioAsyncConnection.java +++ b/src/org/redkale/net/TcpNioAsyncConnection.java @@ -532,6 +532,9 @@ public class TcpNioAsyncConnection extends AsyncConnection { @Override public final void close() throws IOException { super.close(); + if (this.connectKey != null) this.connectKey.cancel(); + if (this.readKey != null) this.readKey.cancel(); + if (this.writeKey != null) this.writeKey.cancel(); channel.close(); } }