KCP: Fixed transport/config_json.go jsonConfig.KcpConfig, jsonConfig.KcpConfig.AdvancedConfig == nil

pull/170/head
Shelikhoo 9 years ago
parent e72a7cb96f
commit cbb183ec58
No known key found for this signature in database
GPG Key ID: 7791BDB0709ABD21

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

Loading…
Cancel
Save