mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-21 16:56:27 -05:00
allow capacity = 0
This commit is contained in:
parent
d5cb2e88c9
commit
6a1054a0f3
@ -38,20 +38,10 @@ func (this *Config) UnmarshalJSON(data []byte) error {
|
||||
this.Tti = tti
|
||||
}
|
||||
if jsonConfig.UpCap != nil {
|
||||
upCap := *jsonConfig.UpCap
|
||||
if upCap == 0 {
|
||||
log.Error("KCP|Config: Invalid uplink capacity: ", upCap)
|
||||
return common.ErrBadConfiguration
|
||||
}
|
||||
this.UplinkCapacity = upCap
|
||||
this.UplinkCapacity = *jsonConfig.UpCap
|
||||
}
|
||||
if jsonConfig.DownCap != nil {
|
||||
downCap := *jsonConfig.DownCap
|
||||
if downCap == 0 {
|
||||
log.Error("KCP|Config: Invalid downlink capacity: ", downCap)
|
||||
return common.ErrBadConfiguration
|
||||
}
|
||||
this.DownlinkCapacity = downCap
|
||||
this.DownlinkCapacity = *jsonConfig.DownCap
|
||||
}
|
||||
if jsonConfig.Congestion != nil {
|
||||
this.Congestion = *jsonConfig.Congestion
|
||||
|
Loading…
Reference in New Issue
Block a user