diff --git a/transport/internet/kcp/config_json.go b/transport/internet/kcp/config_json.go index b476112a4..4e3f1425d 100644 --- a/transport/internet/kcp/config_json.go +++ b/transport/internet/kcp/config_json.go @@ -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