mirror of
https://github.com/oneclickvirt/ecs.git
synced 2025-10-24 16:00:32 +08:00
fix: 修复部分单项测试说明错位
This commit is contained in:
20
goecs.go
20
goecs.go
@@ -40,7 +40,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
ecsVersion = "v0.1.78"
|
ecsVersion = "v0.1.79"
|
||||||
menuMode bool
|
menuMode bool
|
||||||
onlyChinaTest bool
|
onlyChinaTest bool
|
||||||
input, choice string
|
input, choice string
|
||||||
@@ -582,7 +582,6 @@ func runChineseTests(preCheck utils.NetCheckResult, wg1, wg2, wg3, wg4, wg5 *syn
|
|||||||
go func() {
|
go func() {
|
||||||
defer wg4.Done()
|
defer wg4.Done()
|
||||||
backtraceInfo = utils.PrintAndCapture(func() {
|
backtraceInfo = utils.PrintAndCapture(func() {
|
||||||
utils.PrintCenteredTitle("上游及回程线路检测", width)
|
|
||||||
upstreams.UpstreamsCheck()
|
upstreams.UpstreamsCheck()
|
||||||
}, "", "")
|
}, "", "")
|
||||||
}()
|
}()
|
||||||
@@ -592,7 +591,6 @@ func runChineseTests(preCheck utils.NetCheckResult, wg1, wg2, wg3, wg4, wg5 *syn
|
|||||||
go func() {
|
go func() {
|
||||||
defer wg5.Done()
|
defer wg5.Done()
|
||||||
nt3Info = utils.PrintAndCapture(func() {
|
nt3Info = utils.PrintAndCapture(func() {
|
||||||
utils.PrintCenteredTitle("三网回程路由检测", width)
|
|
||||||
nexttrace.NextTrace3Check(language, nt3Location, nt3CheckType)
|
nexttrace.NextTrace3Check(language, nt3Location, nt3CheckType)
|
||||||
}, "", "")
|
}, "", "")
|
||||||
}()
|
}()
|
||||||
@@ -819,20 +817,22 @@ func runEmailTests(wg2 *sync.WaitGroup, emailInfo *string, output, tempOutput st
|
|||||||
func runNetworkTests(wg3, wg4, wg5 *sync.WaitGroup, ptInfo, backtraceInfo, nt3Info *string, output, tempOutput string, outputMutex *sync.Mutex) string {
|
func runNetworkTests(wg3, wg4, wg5 *sync.WaitGroup, ptInfo, backtraceInfo, nt3Info *string, output, tempOutput string, outputMutex *sync.Mutex) string {
|
||||||
outputMutex.Lock()
|
outputMutex.Lock()
|
||||||
defer outputMutex.Unlock()
|
defer outputMutex.Unlock()
|
||||||
if wg4 != nil {
|
|
||||||
wg4.Wait()
|
|
||||||
}
|
|
||||||
if wg5 != nil {
|
|
||||||
wg5.Wait()
|
|
||||||
}
|
|
||||||
return utils.PrintAndCapture(func() {
|
return utils.PrintAndCapture(func() {
|
||||||
if backtraceStatus && !onlyChinaTest && *backtraceInfo != "" {
|
if backtraceStatus && !onlyChinaTest && *backtraceInfo != "" {
|
||||||
|
if wg4 != nil {
|
||||||
|
wg4.Wait()
|
||||||
|
}
|
||||||
|
utils.PrintCenteredTitle("上游及回程线路检测", width)
|
||||||
fmt.Print(*backtraceInfo)
|
fmt.Print(*backtraceInfo)
|
||||||
}
|
}
|
||||||
if nt3Status && !onlyChinaTest && *nt3Info != "" {
|
if nt3Status && !onlyChinaTest && *nt3Info != "" {
|
||||||
|
if wg5 != nil {
|
||||||
|
wg5.Wait()
|
||||||
|
}
|
||||||
|
utils.PrintCenteredTitle("三网回程路由检测", width)
|
||||||
fmt.Print(*nt3Info)
|
fmt.Print(*nt3Info)
|
||||||
}
|
}
|
||||||
if onlyChinaTest || pingTestStatus {
|
if (onlyChinaTest || pingTestStatus) && *ptInfo != "" {
|
||||||
wg3.Wait()
|
wg3.Wait()
|
||||||
utils.PrintCenteredTitle("三网ICMP的PING值检测", width)
|
utils.PrintCenteredTitle("三网ICMP的PING值检测", width)
|
||||||
fmt.Println(*ptInfo)
|
fmt.Println(*ptInfo)
|
||||||
|
|||||||
Reference in New Issue
Block a user