From f941e9205a86eef84abb6fdf31bdb5daf3567f61 Mon Sep 17 00:00:00 2001 From: JungJun Date: Thu, 21 Jul 2022 09:16:13 +0900 Subject: [PATCH] =?UTF-8?q?=ED=8A=B9=EC=A0=95=20=EC=8B=9C=EB=82=98?= =?UTF-8?q?=EB=A6=AC=EC=98=A4=EB=B2=BC=EB=A1=9C=20timeSleep?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- icshttp/handler.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/icshttp/handler.go b/icshttp/handler.go index 1edd2fa..1542f9e 100644 --- a/icshttp/handler.go +++ b/icshttp/handler.go @@ -287,8 +287,9 @@ func (s *ScenarioSession) BOTPFunc(w http.ResponseWriter, r *http.Request) { } l.Printf(icslog.LOG_LEVEL_INFO, -1, "Send Message\n %s", string(resMarshal)) - if conf.TimeSleep.Value { - time.Sleep(time.Second * time.Duration(time.Duration(conf.TimeSleep.TimeSleep))) + if scnarioConf.TimeValue[s.session[request.Token].Count] { + l.Printf(icslog.LOG_LEVEL_INFO, -1, "Time Sleep %d \r\n", scnarioConf.TimeSleep[s.session[request.Token].Count]) + time.Sleep(time.Second * time.Duration(time.Duration(scnarioConf.TimeSleep[s.session[request.Token].Count]))) } // send response