diff --git a/src/core/src/main/java/org/tio/client/ConnectionCompletionHandler.java b/src/core/src/main/java/org/tio/client/ConnectionCompletionHandler.java index 68b25e70..14c54d44 100644 --- a/src/core/src/main/java/org/tio/client/ConnectionCompletionHandler.java +++ b/src/core/src/main/java/org/tio/client/ConnectionCompletionHandler.java @@ -143,7 +143,7 @@ private void handler(Void result, ConnectionCompletionVo attachment, Throwable t } else { if (clientAioListener != null) { if (isConnected) { - channelContext.stat.heartbeatTimeoutCount = 0; + channelContext.stat.heartbeatTimeoutCount.set(0); channelContext.setCloseCode(CloseCode.INIT_STATUS); } clientAioListener.onAfterConnected(channelContext, isConnected, isReconnect);