mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-06-17 08:19:57 -04:00
propagate context
This commit is contained in:
@@ -14,7 +14,7 @@ import (
|
||||
|
||||
// CreateObject creates a new object based on the given V2Ray instance and config. The V2Ray instance may be nil.
|
||||
func CreateObject(v *Instance, config interface{}) (interface{}, error) {
|
||||
ctx := context.Background()
|
||||
ctx := v.ctx
|
||||
if v != nil {
|
||||
ctx = context.WithValue(ctx, v2rayKey, v)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user