充电机重连后自动发送鉴权消息

zw
rszn 6 months ago
parent 5e98360025
commit 81d7be83eb

@ -547,11 +547,6 @@ public class ChargerClient : TcpClient<IBaseHandler, Decoder, Encoder>
public bool Connect()
{
base.BaseConnect();
if (Connected)
{
SendAuth();
}
return Connected;
}

@ -94,6 +94,7 @@ public static class ClientMgr
client.Sn = netInfo.Code;
client.BinNo = binInfo?.No;
client.BatteryNo = binInfo?.BatteryNo;
client.ConnectedEventHandler += (sender, b) => client.SendAuth();
client.InitBootstrap(netInfo.NetAddr, int.Parse(netInfo.NetPort));
Task.Run(() =>

Loading…
Cancel
Save