mirror of https://github.com/gorilla/websocket.git
Fix mask key.
This commit is contained in:
parent
10afcadf69
commit
bda3d7d128
2
conn.go
2
conn.go
|
@ -120,7 +120,7 @@ func maskBytes(key [4]byte, pos int, b []byte) int {
|
||||||
|
|
||||||
func newMaskKey() [4]byte {
|
func newMaskKey() [4]byte {
|
||||||
n := rand.Uint32()
|
n := rand.Uint32()
|
||||||
return [4]byte{byte(n), byte(n >> 8), byte(n >> 16), byte(n >> 32)}
|
return [4]byte{byte(n), byte(n >> 8), byte(n >> 16), byte(n >> 24)}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Conn represents a WebSocket connection.
|
// Conn represents a WebSocket connection.
|
||||||
|
|
Loading…
Reference in New Issue