mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-02 15:36:41 -05:00
make readv optional
This commit is contained in:
parent
a941ef5392
commit
82ee23e6d0
@ -54,14 +54,8 @@ var useReadv = false
|
||||
|
||||
func init() {
|
||||
const defaultFlagValue = "NOT_DEFINED_AT_ALL"
|
||||
value := platform.NewEnvFlag("v2ray.buf.readv.disable").GetValue(func() string { return defaultFlagValue })
|
||||
if value != defaultFlagValue {
|
||||
useReadv = false
|
||||
return
|
||||
}
|
||||
|
||||
if runtime.GOOS == "linux" || runtime.GOOS == "darwin" {
|
||||
newError("ReadV enabled").WriteToLog()
|
||||
value := platform.NewEnvFlag("v2ray.buf.readv").GetValue(func() string { return defaultFlagValue })
|
||||
if value != defaultFlagValue && (runtime.GOOS == "linux" || runtime.GOOS == "darwin") {
|
||||
useReadv = true
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user