[bug]半实物服务意料之外的报错
This commit is contained in:
parent
0018492f8d
commit
38b1a79633
@ -62,6 +62,9 @@ func (s *semiPhysicalTrainImpl) handleTrainControlMsg(b []byte) {
|
||||
}
|
||||
|
||||
func (s *semiPhysicalTrainImpl) Start(manager SemiPhysicalMessageManager) {
|
||||
if s.runConfig == nil || s.runConfig.Ip == "" || !s.runConfig.Open {
|
||||
return
|
||||
}
|
||||
if manager == nil {
|
||||
panic("启动半实物消息服务错误: SemiPhysicalMessageManager不能为nil")
|
||||
}
|
||||
@ -69,14 +72,11 @@ func (s *semiPhysicalTrainImpl) Start(manager SemiPhysicalMessageManager) {
|
||||
panic("启动半实物消息服务错误: 存在正在运行的任务")
|
||||
}
|
||||
s.runConfig = manager.GetSemiPhysicalRunConfig()
|
||||
if s.runConfig == nil || s.runConfig.Ip == "" || !s.runConfig.Open {
|
||||
return
|
||||
}
|
||||
// 初始化客户端、服务端
|
||||
s.initSemiPhysical()
|
||||
s.manager = manager
|
||||
s.updateState(tpapi.ThirdPartyState_Normal)
|
||||
s.udpDelayRecorder.Start()
|
||||
s.manager = manager
|
||||
}
|
||||
|
||||
func (s *semiPhysicalTrainImpl) Stop() {
|
||||
|
Loading…
Reference in New Issue
Block a user