无限重连创建链接会不中断之前连接,导致内存线程空转,等到重连心跳狂发

hongrunHaotian
LAPTOP-S9HJSOEB\昊天 3 years ago
parent 1ba7deeab2
commit b11cda3fc2

@ -74,6 +74,7 @@ public class KsecNettyClient {
} catch (Exception e) {
//没连上 继续
log.error("reconnect error num:{}", num);
channel.close();
num++;
try {
Thread.sleep(ksec.getReconnectInterval()*1000);

Loading…
Cancel
Save