Skip to content

Commit

Permalink
Merge pull request #96 from brave/max_active_device_50
Browse files Browse the repository at this point in the history
Bump max active device limit to 50
  • Loading branch information
yrliou authored Jan 10, 2022
2 parents 0949b7d + 7fe8768 commit 478f106
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions command/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const (
setSyncPollInterval int32 = 30
nigoriTypeID int32 = 47745
deviceInfoTypeID int = 154522
maxActiveDevices int = 20
maxActiveDevices int = 50
)

// handleGetUpdatesRequest handles GetUpdatesMessage and fills
Expand All @@ -36,7 +36,7 @@ func handleGetUpdatesRequest(cache *cache.Cache, guMsg *sync_pb.GetUpdatesMessag
isNewClient := guMsg.GetUpdatesOrigin != nil && *guMsg.GetUpdatesOrigin == sync_pb.SyncEnums_NEW_CLIENT
isPoll := guMsg.GetUpdatesOrigin != nil && *guMsg.GetUpdatesOrigin == sync_pb.SyncEnums_PERIODIC
if isNewClient {
// Reject the request if client has >= 20 devices in the chain.
// Reject the request if client has >= 50 devices in the chain.
activeDevices := 0
for {
hasChangesRemaining, syncEntities, err := db.GetUpdatesForType(deviceInfoTypeID, 0, false, clientID, int64(maxGUBatchSize))
Expand Down

0 comments on commit 478f106

Please sign in to comment.