【删除init中的配置判断(init中未初始化,导致判断出错)】

This commit is contained in:
weizhihong 2023-10-08 10:44:42 +08:00
parent 781c328e49
commit 262f02b570
3 changed files with 0 additions and 9 deletions

View File

@ -23,9 +23,6 @@ import (
)
func init() {
if !config.Config.Dynamics.Open {
return
}
// vobc 发来的列车信息
vobc.RegisterTrainInfoHandler(func(info []byte) {
memory.UdpUpdateTime.VobcTime = time.Now().UnixMilli()

View File

@ -16,9 +16,6 @@ import (
)
func init() {
if !config.Config.Dynamics.Open {
return
}
go func() {
for {
info := <-trainInfoChan

View File

@ -26,9 +26,6 @@ var (
)
func init() {
if !config.Config.Vobc.Open {
return
}
go func() {
for {
info := <-vobcMsgInfoChan