Avoid opening log output before start &

Replace tracing logs with task monitor
This commit is contained in:
世界
2023-12-04 11:47:25 +08:00
parent 311a2f0b17
commit 1637aebfb7
14 changed files with 222 additions and 257 deletions

View File

@@ -14,6 +14,7 @@ import (
"github.com/sagernet/sing-box"
"github.com/sagernet/sing-box/common/badjsonmerge"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing-box/option"
E "github.com/sagernet/sing/common/exceptions"
@@ -193,7 +194,7 @@ func run() error {
}
func closeMonitor(ctx context.Context) {
time.Sleep(3 * time.Second)
time.Sleep(C.DefaultStopFatalTimeout)
select {
case <-ctx.Done():
return