fix panic for sing

This commit is contained in:
Yuzuki616 committed 2023-08-09 19:19:36 +08:00
1 parent 991b22a317
commit d06aa29bc8
2 files changed
+3 -1

No files matched your search

+2
View File
@@ -20,6 +20,7 @@ import (
"github.com/sagernet/sing/common"
E "github.com/sagernet/sing/common/exceptions"
F "github.com/sagernet/sing/common/format"
"github.com/sagernet/sing/service/pause"
)
var _ adapter.Service = (*Box)(nil)
@@ -48,6 +49,7 @@ func New(c *conf.CoreConfig) (vCore.Core, error) {
Output: c.SingConfig.LogConfig.Output,
}
ctx := context.Background()
ctx = pause.ContextWithDefaultManager(ctx)
createdAt := time.Now()
experimentalOptions := common.PtrValueOrDefault(options.Experimental)
applyDebugOptions(common.PtrValueOrDefault(experimentalOptions.Debug))