Skip to content

Commit

Permalink
Fix mask key.
Browse files Browse the repository at this point in the history
  • Loading branch information
garyburd committed Jul 24, 2014
1 parent 10afcad commit bda3d7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit bda3d7d

Please sign in to comment.