重连成功后设置session属性

master
rszn 6 months ago
parent d9f4e95319
commit e42f8981bf

@ -95,7 +95,11 @@ public static class ClientMgr
client.BinNo = binInfo?.No;
client.BatteryNo = binInfo?.BatteryNo;
client.LogName = "Charger" + netInfo.Code;
client.ConnectedEventHandler += (sender, b) => client.SendAuth();
client.ConnectedEventHandler += (sender, b) =>
{
client.SessionAttr(netInfo.Code, netInfo.DestAddr);
client.SendAuth();
};
client.InitBootstrap(netInfo.NetAddr, int.Parse(netInfo.NetPort));
Task.Run(() =>

Loading…
Cancel
Save