Skip to content

Commit b2a0ad4

Browse files
committed
block rand metric
1 parent e25a535 commit b2a0ad4

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

simple-game-server-go/internal/game/allocated.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ package game
22

33
import (
44
"context"
5-
"crypto/rand"
5+
// "crypto/rand"
66
"errors"
77
"fmt"
8-
"math/big"
8+
// "math/big"
99
"net"
1010
"strconv"
1111
"syscall"
1212
"time"
1313

14-
"github.com/Unity-Technologies/unity-gaming-services-go-sdk/game-server-hosting/server"
14+
// "github.com/Unity-Technologies/unity-gaming-services-go-sdk/game-server-hosting/server"
1515
"github.com/sirupsen/logrus"
1616
)
1717

@@ -37,12 +37,12 @@ func (g *Game) allocated(allocationID string) {
3737
g.Server.SetGameType(c.Extra["gameType"])
3838
g.Server.SetGameMap(c.Extra["map"])
3939

40-
// Set a random metric, if using SQP.
41-
if c.QueryType == server.QueryProtocolSQP {
42-
if i, err := rand.Int(rand.Reader, big.NewInt(100)); err == nil {
43-
_ = g.SetMetric(0, float32(i.Int64()))
44-
}
45-
}
40+
// // Set a random metric, if using SQP.
41+
// if c.QueryType == server.QueryProtocolSQP {
42+
// if i, err := rand.Int(rand.Reader, big.NewInt(100)); err == nil {
43+
// _ = g.SetMetric(0, float32(i.Int64()))
44+
// }
45+
// }
4646

4747
go g.launchGame(port)
4848
}

0 commit comments

Comments
 (0)