Skip to content

Commit c97fb09

Browse files
committed
mask_asm: Disable for now until v1.9.0
See coder#326
1 parent 0edbb28 commit c97fb09

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

mask.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ import (
1616
// to be in little endian.
1717
//
1818
// See https://github.com/golang/go/issues/31586
19-
//
20-
//lint:ignore U1000 mask.go
2119
func maskGo(b []byte, key uint32) uint32 {
2220
if len(b) >= 8 {
2321
key64 := uint64(key)<<32 | uint64(key)

mask_asm.go

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,14 @@
33
package websocket
44

55
func mask(b []byte, key uint32) uint32 {
6-
if len(b) > 0 {
7-
return maskAsm(&b[0], len(b), key)
8-
}
9-
return key
6+
// TODO: Will enable in v1.9.0.
7+
return maskGo(b, key)
8+
/*
9+
if len(b) > 0 {
10+
return maskAsm(&b[0], len(b), key)
11+
}
12+
return key
13+
*/
1014
}
1115

1216
// @nhooyr: I am not confident that the amd64 or the arm64 implementations of this
@@ -18,4 +22,5 @@ func mask(b []byte, key uint32) uint32 {
1822
// See https://github.com/nhooyr/websocket/pull/326#issuecomment-1771138049
1923
//
2024
//go:noescape
25+
//lint:ignore U1000 disabled till v1.9.0
2126
func maskAsm(b *byte, len int, key uint32) uint32

0 commit comments

Comments
 (0)