重构代理解析流程,引入端口混合协议转发
This commit is contained in:
@@ -66,11 +66,9 @@ func Start() {
|
||||
|
||||
timeout, cancel := context.WithTimeout(context.Background(), 5*time.Second)
|
||||
defer cancel()
|
||||
wgCh := utils.ChanWgWait(timeout, &wg)
|
||||
close(wgCh)
|
||||
|
||||
select {
|
||||
case <-wgCh:
|
||||
case <-utils.ChanWgWait(timeout, &wg):
|
||||
slog.Info("服务已退出")
|
||||
case <-timeout.Done():
|
||||
slog.Warn("退出超时,强制退出")
|
||||
|
||||
Reference in New Issue
Block a user