Fix mask key.

This commit is contained in:
Gary Burd 2014-07-23 20:32:33 -07:00
parent 10afcadf69
commit bda3d7d128
1 changed files with 1 additions and 1 deletions

View File

@ -120,7 +120,7 @@ func maskBytes(key [4]byte, pos int, b []byte) int {
func newMaskKey() [4]byte {
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.