From 76a7e927876953703fa7f6f934f583f2abee9d3f Mon Sep 17 00:00:00 2001 From: Redkale <8730487+redkale@users.noreply.github.com> Date: Fri, 26 Jun 2020 22:06:22 +0800 Subject: [PATCH] --- src/org/redkale/net/TcpNioAsyncConnection.java | 3 +++ 1 file changed, 3 insertions(+) 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(); } }