From 10b8d9fc9da6437aef4a4fc7a585c0083fd1cbe3 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 3 Nov 2020 19:58:46 +0800 Subject: [PATCH] 1 --- server/analyseapi/riskmgr.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/analyseapi/riskmgr.go b/server/analyseapi/riskmgr.go index f35023a..45f9316 100644 --- a/server/analyseapi/riskmgr.go +++ b/server/analyseapi/riskmgr.go @@ -298,6 +298,9 @@ func (this *RiskMgr) __analyseIsOpen(w* http.ResponseWriter, r *http.Request) { atomic.AddInt64(&this.totalPassTimes, 1) atomic.AddInt64(&this.passTimes, 1) if this.clusterConf.GetTesting() == 1 { + if response_str == "" { + response_str = `""` + } data := fmt.Sprintf(`{"errcode":0, "errmsg":"", "is_open":%d, "data":%s}`, 1, response_str) @@ -309,6 +312,9 @@ func (this *RiskMgr) __analyseIsOpen(w* http.ResponseWriter, r *http.Request) { atomic.AddInt64(&this.totalBlockTimes, 1) atomic.AddInt64(&this.blockTimes, 1) if this.clusterConf.GetTesting() == 1 { + if response_str == "" { + response_str = `""` + } data := fmt.Sprintf(`{"errcode":0, "errmsg":"", "is_open":%d, "data":%s}`, 0, response_str)