Skip to content

Commit

Permalink
dialer: fix benchmark error
Browse files Browse the repository at this point in the history
  • Loading branch information
gobwas committed Jun 1, 2019
1 parent a001142 commit fa46b22
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dialer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ func BenchmarkDialer(b *testing.B) {
nonceBytes[i*nonceKeySize:i*nonceKeySize+nonceKeySize],
)
accept := makeAccept(nonce)
resp.Header.Set(headerSecAccept, string(accept))
resp.Header[headerSecAccept] = []string{string(accept)}
rs[i] = dumpResponse(resp)
}

Expand Down
2 changes: 1 addition & 1 deletion nonce.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func checkAcceptFromNonce(accept, nonce []byte) bool {
if len(accept) != acceptSize {
return false
}
// NOTE: expect does not escapes.
// NOTE: expect does not escape.
expect := make([]byte, acceptSize)
initAcceptFromNonce(expect, nonce)
return bytes.Equal(expect, accept)
Expand Down

0 comments on commit fa46b22

Please sign in to comment.