update default response

pull/170/head
v2ray 2016-06-10 23:09:14 +02:00
parent 8b3875050d
commit 9c3f2ada47
1 changed files with 2 additions and 2 deletions

View File

@ -17,9 +17,9 @@ func (this *Config) UnmarshalJSON(data []byte) error {
if err := json.Unmarshal(data, jsonConfig); err != nil {
return err
}
this.Response = new(NoneResponse)
if jsonConfig.Response == nil {
this.Response = new(NoneResponse)
} else {
loader := loader.NewJSONConfigLoader("type", "")
loader.RegisterCreator("none", func() interface{} { return new(NoneResponse) })
loader.RegisterCreator("http", func() interface{} { return new(HTTPResponse) })