diff --git a/src/org/redkale/net/AsyncConnection.java b/src/org/redkale/net/AsyncConnection.java index 93f8382f9..33a873638 100644 --- a/src/org/redkale/net/AsyncConnection.java +++ b/src/org/redkale/net/AsyncConnection.java @@ -107,7 +107,11 @@ public abstract class AsyncConnection implements AsynchronousByteChannel, AutoCl livingCounter.decrementAndGet(); livingCounter = null; } - if (beforeCloseListener != null) beforeCloseListener.accept(this); + if (beforeCloseListener != null) + try { + beforeCloseListener.accept(this); + } catch (Exception io) { + } if (attributes == null) return; try { for (Object obj : attributes.values()) {