Skip to content

Commit eb5bd70

Browse files
committed
Delay response only if avg latency is set
1 parent 636677d commit eb5bd70

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

server/server.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,9 @@ func (s *StubServer) HandleRequest(w http.ResponseWriter, r *http.Request) {
272272
// Delaying the response according to acg-latency and stdv
273273
//
274274

275-
s.delay()
275+
if s.delayResponses {
276+
s.delay()
277+
}
276278

277279
//
278280
// Validate headers

0 commit comments

Comments
 (0)