Migration: go1.20
This commit is contained in:
@ -4,9 +4,10 @@ import (
|
||||
"bytes"
|
||||
"crypto/aes"
|
||||
"crypto/cipher"
|
||||
"crypto/rand"
|
||||
"encoding/base64"
|
||||
"encoding/binary"
|
||||
"math/rand"
|
||||
mathRand "math/rand"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
@ -38,7 +39,7 @@ func (a *authData) next() *authData {
|
||||
defer a.mutex.Unlock()
|
||||
if a.connectionID > 0xff000000 || a.connectionID == 0 {
|
||||
rand.Read(a.clientID[:])
|
||||
a.connectionID = rand.Uint32() & 0xffffff
|
||||
a.connectionID = mathRand.Uint32() & 0xffffff
|
||||
}
|
||||
a.connectionID++
|
||||
copy(r.clientID[:], a.clientID[:])
|
||||
|
Reference in New Issue
Block a user