Skip to content

Commit eb98a7b

Browse files
committed
fix: 更加严格的启动条件,同时避免死锁等待
1 parent d4d8622 commit eb98a7b

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

goecs.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import (
3939
)
4040

4141
var (
42-
ecsVersion = "v0.1.41"
42+
ecsVersion = "v0.1.42"
4343
menuMode bool
4444
onlyChinaTest bool
4545
input, choice string
@@ -470,7 +470,7 @@ func runChineseTests(preCheck utils.NetCheckResult, wg1, wg2, wg3 *sync.WaitGrou
470470
*emailInfo = email.EmailCheck()
471471
}()
472472
}
473-
if utTestStatus && preCheck.Connected && preCheck.StackType != "" && preCheck.StackType != "None" {
473+
if utTestStatus && preCheck.Connected && preCheck.StackType != "" && preCheck.StackType != "None" && !onlyChinaTest {
474474
wg1.Add(1)
475475
go func() {
476476
defer wg1.Done()
@@ -622,8 +622,6 @@ func runStreamingTests(wg1 *sync.WaitGroup, mediaInfo string, output, tempOutput
622622
utils.PrintCenteredTitle("Cross-Border-Streaming-Media-Unlock", width)
623623
}
624624
fmt.Printf("%s", mediaInfo)
625-
} else {
626-
wg1.Wait()
627625
}
628626
}, tempOutput, output)
629627
}
@@ -651,8 +649,6 @@ func runEmailTests(wg2 *sync.WaitGroup, emailInfo string, output, tempOutput str
651649
utils.PrintCenteredTitle("Email-Port-Check", width)
652650
}
653651
fmt.Println(emailInfo)
654-
} else {
655-
wg2.Wait()
656652
}
657653
}, tempOutput, output)
658654
}
@@ -679,8 +675,6 @@ func runNetworkTests(wg3 *sync.WaitGroup, ptInfo string, output, tempOutput stri
679675
wg3.Wait()
680676
utils.PrintCenteredTitle("三网ICMP的PING值检测", width)
681677
fmt.Println(ptInfo)
682-
} else {
683-
wg3.Wait()
684678
}
685679
}, tempOutput, output)
686680
}

0 commit comments

Comments
 (0)