Skip to content

Commit 7dc18a1

Browse files
committed
fixing max allowed value for all platforms
1 parent 2ec3287 commit 7dc18a1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

db/session.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@ import (
66
randCrypto "crypto/rand"
77
"encoding/binary"
88
"fmt"
9-
"math"
109
randMath "math/rand"
1110
"time"
1211
)
1312

1413
// SessionInit generates a new session for the specified user and updates the database.
1514
func SessionInit(userId int64) string {
1615
var seed int64
17-
maxValue := int(math.MaxUint32)
16+
maxValue := 1000 * 1000 * 1000
1817
randBytes := make([]byte, 8)
1918
n, err := randCrypto.Read(randBytes)
2019
if err != nil || n != 8 {

0 commit comments

Comments
 (0)