Simplify slice to array conversion
This commit is contained in:
1 parent
e1dbcccab5
commit
76ee64ae50
4 files changed
+5
-5
No files matched your search
@@ -63,7 +63,7 @@ func (w *Writer) WriteBuffer(buffer *buf.Buffer) error {
|
||||
if !w.isServer {
|
||||
maskKey := rand.Uint32()
|
||||
binary.BigEndian.PutUint32(header[1+payloadBitLength:], maskKey)
|
||||
ws.Cipher(data, *(*[4]byte)(header[1+payloadBitLength:]), 0)
|
||||
ws.Cipher(data, [4]byte(header[1+payloadBitLength:]), 0)
|
||||
}
|
||||
|
||||
return wrapWsError(w.writer.WriteBuffer(buffer))
|
||||
|
||||
Reference in new issue
Block a user