mirror of
https://github.com/p4gefau1t/trojan-go.git
synced 2024-04-21 12:21:34 +00:00
Fix context (#332)
This commit is contained in:
+2
-2
@@ -172,12 +172,12 @@ func NewProxyFromConfigData(data []byte, isJSON bool) (*Proxy, error) {
|
||||
ctx := context.WithValue(context.Background(), Name+"_ID", rand.Int())
|
||||
var err error
|
||||
if isJSON {
|
||||
ctx, err = config.WithJSONConfig(context.Background(), data)
|
||||
ctx, err = config.WithJSONConfig(ctx, data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
} else {
|
||||
ctx, err = config.WithYAMLConfig(context.Background(), data)
|
||||
ctx, err = config.WithYAMLConfig(ctx, data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user