mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
chore: update math/rand to math/rand/v2
This commit is contained in:
1 parent
8e81e09a8f
commit
6aee7b35c0
22 files changed
+75
-80
No files matched your search
+2
-2
@@ -25,7 +25,7 @@ package ws
|
||||
import (
|
||||
"encoding/binary"
|
||||
"io"
|
||||
"math/rand"
|
||||
"math/rand/v2"
|
||||
"net"
|
||||
|
||||
"github.com/nadoo/glider/pkg/pool"
|
||||
@@ -93,7 +93,7 @@ func (w *frameWriter) Write(b []byte) (int, error) {
|
||||
defer pool.PutBuffer(payload)
|
||||
|
||||
// payload with mask
|
||||
for i := 0; i < nPayload; i++ {
|
||||
for i := range nPayload {
|
||||
payload[i] = b[i] ^ w.maskKey[i%4]
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user