|
|
@@ -156,11 +156,11 @@ namespace YSAI.Core.communication.net.tcp.client
|
|
|
OnEventHandler(this, new EventResult(false, $"[{ClassName}]断线重连失败,连接超时,重连{ReconnectionCount}次")); //数据传递出去
|
|
|
ReconnectionCount++;
|
|
|
}
|
|
|
- else
|
|
|
- {
|
|
|
- OnEventHandler(this, new EventResult(true, $"[{ClassName}]断线重连成功")); //数据传递出去
|
|
|
- ReconnectionCount = 1;
|
|
|
- }
|
|
|
+ }
|
|
|
+ if (ReconnectionCount > 1)
|
|
|
+ {
|
|
|
+ OnEventHandler(this, new EventResult(true, $"[{ClassName}]断线重连成功")); //数据传递出去
|
|
|
+ ReconnectionCount = 1;
|
|
|
}
|
|
|
}
|
|
|
catch (Exception ex)
|