Skip to content

Commit b361245

Browse files
authored
Merge pull request #609 from AikidoSec/compressed-stats-heartbeat
Don't send heartbeat when there are compressed stats
2 parents 031b06c + e633b1e commit b361245

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

library/agent/Agent.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -357,12 +357,10 @@ export class Agent {
357357
const now = performance.now();
358358
const diff = now - this.lastHeartbeat;
359359
const shouldSendHeartbeat = diff > this.sendHeartbeatEveryMS;
360-
const hasCompressedStats = this.statistics.hasCompressedStats();
361360
const canSendInitialStats =
362361
!this.serviceConfig.hasReceivedAnyStats() && !this.statistics.isEmpty();
363362
const shouldReportInitialStats =
364-
!this.reportedInitialStats &&
365-
(hasCompressedStats || canSendInitialStats);
363+
!this.reportedInitialStats && canSendInitialStats;
366364

367365
if (shouldSendHeartbeat || shouldReportInitialStats) {
368366
this.heartbeat();

0 commit comments

Comments
 (0)