Skip to content

Commit 77080f9

Browse files
committed
Update version selector
1 parent 75d010d commit 77080f9

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

internal/api/handler.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3364,16 +3364,14 @@ func pprofAccessAllowed(h *httpRequestHandler) bool {
33643364

33653365
func (h *requestHandler) init(accessToken, version string) (err error) {
33663366
switch version {
3367-
case Version1:
3368-
h.version = Version1
3369-
case Version2:
3367+
case Version1, Version3:
3368+
h.version = version
3369+
case Version2, "":
33703370
if rand.Float64() < h.Handler.Version3Prob.Load() {
33713371
h.version = Version3
33723372
} else {
33733373
h.version = Version2
33743374
}
3375-
case Version3, "":
3376-
h.version = Version3
33773375
default:
33783376
return fmt.Errorf("invalid version: %q", version)
33793377
}

0 commit comments

Comments
 (0)