断连后重连交接柜时间间隔2s
This commit is contained in:
parent
946fe26a17
commit
35270de250
|
@ -94,6 +94,7 @@ namespace DM_Weight.Port
|
||||||
{
|
{
|
||||||
if (i <= 3)
|
if (i <= 3)
|
||||||
{
|
{
|
||||||
|
Thread.Sleep(1950);
|
||||||
//没连上会再连两次
|
//没连上会再连两次
|
||||||
SocketConnect();
|
SocketConnect();
|
||||||
}
|
}
|
||||||
|
|
|
@ -875,11 +875,11 @@ namespace DM_Weight.ViewModels
|
||||||
{
|
{
|
||||||
AlertMsg alertMsg = new AlertMsg
|
AlertMsg alertMsg = new AlertMsg
|
||||||
{
|
{
|
||||||
Message = $"网口连接异常,正在重试{ex.Message}",
|
Message = $"网口连接异常,开药箱正在重试{ex.Message}",
|
||||||
Type = MsgType.ERROR,
|
Type = MsgType.ERROR,
|
||||||
};
|
};
|
||||||
_eventAggregator.GetEvent<SnackbarEvent>().Publish(alertMsg);
|
_eventAggregator.GetEvent<SnackbarEvent>().Publish(alertMsg);
|
||||||
logger.Info($"网口连接异常,正在重试{ex.Message}");
|
logger.Info($"网口连接异常,开药箱正在重试{ex.Message}");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_socketHelper.OpenStatus = true;
|
_socketHelper.OpenStatus = true;
|
||||||
|
@ -939,11 +939,11 @@ namespace DM_Weight.ViewModels
|
||||||
// _socketHelper.OpenStatus = false;
|
// _socketHelper.OpenStatus = false;
|
||||||
AlertMsg alertMsg = new AlertMsg
|
AlertMsg alertMsg = new AlertMsg
|
||||||
{
|
{
|
||||||
Message = $"网口连接异常,正在重试{ex.Message}",
|
Message = $"网口连接异常,查状态正在重试{ex.Message}",
|
||||||
Type = MsgType.ERROR,
|
Type = MsgType.ERROR,
|
||||||
};
|
};
|
||||||
_eventAggregator.GetEvent<SnackbarEvent>().Publish(alertMsg);
|
_eventAggregator.GetEvent<SnackbarEvent>().Publish(alertMsg);
|
||||||
logger.Info($"网口连接异常,正在重试{ex.Message}");
|
logger.Info($"网口连接异常,查状态正在重试{ex.Message}");
|
||||||
next();
|
next();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -675,7 +675,7 @@ namespace DM_Weight.ViewModels
|
||||||
{
|
{
|
||||||
AlertMsg alertMsg = new AlertMsg
|
AlertMsg alertMsg = new AlertMsg
|
||||||
{
|
{
|
||||||
Message = $"网口连接异常,正在重试{ex.Message}",
|
Message = $"网口连接异常,开药箱正在重试{ex.Message}",
|
||||||
Type = MsgType.ERROR,
|
Type = MsgType.ERROR,
|
||||||
};
|
};
|
||||||
_eventAggregator.GetEvent<SnackbarEvent>().Publish(alertMsg);
|
_eventAggregator.GetEvent<SnackbarEvent>().Publish(alertMsg);
|
||||||
|
@ -771,11 +771,11 @@ namespace DM_Weight.ViewModels
|
||||||
}
|
}
|
||||||
AlertMsg alertMsg = new AlertMsg
|
AlertMsg alertMsg = new AlertMsg
|
||||||
{
|
{
|
||||||
Message = $"网口连接异常,正在重试{ex.Message}",
|
Message = $"网口连接异常,查状态正在重试{ex.Message}",
|
||||||
Type = MsgType.ERROR,
|
Type = MsgType.ERROR,
|
||||||
};
|
};
|
||||||
_eventAggregator.GetEvent<SnackbarEvent>().Publish(alertMsg);
|
_eventAggregator.GetEvent<SnackbarEvent>().Publish(alertMsg);
|
||||||
logger.Info($"网口连接异常,正在重试{ex.Message}");
|
logger.Info($"网口连接异常,查状态正在重试{ex.Message}");
|
||||||
next();
|
next();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue