Skip to content

Commit 556bf61

Browse files
winterTTrtsenart
authored andcommitted
disable the http2 attempt when http2 set to false
Closes #597 Signed-off-by: Tomás Senart <tsenart@gmail.com>
1 parent 4f214b7 commit 556bf61

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/attack.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ func HTTP2(enabled bool) func(*Attacker) {
210210
if tr := a.client.Transport.(*http.Transport); enabled {
211211
http2.ConfigureTransport(tr)
212212
} else {
213+
tr.ForceAttemptHTTP2 = false
213214
tr.TLSNextProto = map[string]func(string, *tls.Conn) http.RoundTripper{}
214215
}
215216
}

0 commit comments

Comments
 (0)