From 9c3f2ada4799d68e2c7b4286d234a60682fd9d2c Mon Sep 17 00:00:00 2001 From: v2ray Date: Fri, 10 Jun 2016 23:09:14 +0200 Subject: [PATCH] update default response --- proxy/blackhole/config_json.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proxy/blackhole/config_json.go b/proxy/blackhole/config_json.go index f12e2cb73..d2d31d28c 100644 --- a/proxy/blackhole/config_json.go +++ b/proxy/blackhole/config_json.go @@ -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) })