KCP: Fixed: typo in <Fixed transport/config_json.go jsonConfig.KcpConfig, jsonConfig.KcpConfig.AdvancedConfig == nil>

pull/170/head
Shelikhoo 2016-06-12 14:12:48 +08:00
parent cbb183ec58
commit 7fdf0de06d
No known key found for this signature in database
GPG Key ID: 7791BDB0709ABD21
1 changed files with 2 additions and 2 deletions

View File

@ -24,8 +24,8 @@ func (this *Config) UnmarshalJSON(data []byte) error {
this.ConnectionReuse = jsonConfig.ConnectionReuse
this.enableKcp = jsonConfig.EnableKcp
this.kcpConfig = jsonConfig.KcpConfig
if jsonConfig.KcpConfig.AdvancedConfig == nil {
jsonConfig.KcpConfig.AdvancedConfig = kcpv.DefaultAdvancedConfigs
if jsonConfig.KcpConfig.AdvancedConfigs == nil {
jsonConfig.KcpConfig.AdvancedConfigs = kcpv.DefaultAdvancedConfigs
}
return nil