Skip to content

Commit f1eb74d

Browse files
committed
remove unused reference heart beat timeout
1 parent 66c47fc commit f1eb74d

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

packages/tracing/src/idletransaction.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ export class IdleTransaction extends Transaction {
5555
// Activities store a list of active spans
5656
public activities: Record<string, boolean> = {};
5757

58-
// Stores reference to the timeout that calls _beat().
59-
private _heartbeatTimer: number = 0;
60-
6158
// Track state of activities in previous heartbeat
6259
private _prevHeartbeatString: string | undefined;
6360

@@ -236,7 +233,6 @@ export class IdleTransaction extends Transaction {
236233
* If this occurs we finish the transaction.
237234
*/
238235
private _beat(): void {
239-
clearTimeout(this._heartbeatTimer);
240236
// We should not be running heartbeat if the idle transaction is finished.
241237
if (this._finished) {
242238
return;
@@ -267,9 +263,9 @@ export class IdleTransaction extends Transaction {
267263
*/
268264
private _pingHeartbeat(): void {
269265
logger.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`);
270-
this._heartbeatTimer = (setTimeout(() => {
266+
setTimeout(() => {
271267
this._beat();
272-
}, 5000) as unknown) as number;
268+
}, 5000);
273269
}
274270
}
275271

0 commit comments

Comments
 (0)