We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9a21d98 commit 38e538cCopy full SHA for 38e538c
speedtest/transport/udp.go
@@ -18,7 +18,7 @@ var (
18
19
type PacketLossSender struct {
20
ID string // UUID
21
- nounce int // Random int (maybe) [0,10000000000)
+ nounce int64 // Random int (maybe) [0,10000000000)
22
withTimestamp bool // With timestamp (ten seconds level)
23
conn net.Conn // UDP Conn
24
raw []byte
@@ -28,7 +28,7 @@ type PacketLossSender struct {
28
29
func NewPacketLossSender(uuid string, dialer *net.Dialer) (*PacketLossSender, error) {
30
rd := mrand.New(mrand.NewSource(time.Now().UnixNano()))
31
- nounce := rd.Intn(10000000000)
+ nounce := rd.Int63n(10000000000)
32
p := &PacketLossSender{
33
ID: strings.ToUpper(uuid),
34
nounce: nounce,
0 commit comments