Skip to content

Commit

Permalink
Merge pull request #246 from tosuapp/limit/ms
Browse files Browse the repository at this point in the history
chore: limit
  • Loading branch information
KotRikD authored Nov 18, 2024
2 parents 9e144d4 + 7972b01 commit 05f6d36
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/common/utils/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const config = {
debugLogging: (process.env.DEBUG_LOG || '') === 'true',
calculatePP: (process.env.CALCULATE_PP || '') === 'true',
enableKeyOverlay: (process.env.ENABLE_KEY_OVERLAY || '') === 'true',
pollRate: Number(process.env.POLL_RATE || '500'),
pollRate: Number(process.env.POLL_RATE || '100'),
preciseDataPollRate: Number(
process.env.PRECISE_DATA_POLL_RATE ||
process.env.KEYOVERLAY_POLL_RATE ||
Expand Down Expand Up @@ -249,7 +249,7 @@ export const refreshConfig = (httpServer: any, refresh: boolean) => {
config.pollRate !== pollRate ||
config.preciseDataPollRate !== preciseDataPollRate
) {
config.pollRate = pollRate >= 0 ? pollRate : 100;
config.pollRate = pollRate >= 100 ? pollRate : 100;
config.preciseDataPollRate =
preciseDataPollRate >= 0 ? preciseDataPollRate : 10;
httpServer.restartWS();
Expand Down
2 changes: 1 addition & 1 deletion packages/server/utils/counters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ export function buildSettings(res: http.ServerResponse) {
inputHTML
.replace('{TYPE}', 'number')
.replace(/{ID}/gm, 'POLL_RATE')
.replace('{ADDON}', config.pollRate ? 'min="0"' : '')
.replace('{ADDON}', config.pollRate ? 'min="100"' : '')
.replace('{VALUE}', `${config.pollRate}`)
);

Expand Down

0 comments on commit 05f6d36

Please sign in to comment.