File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ export class MetricsAggregator implements MetricsAggregatorBase {
37
37
public constructor ( private readonly _client : Client ) {
38
38
this . _buckets = new Map ( ) ;
39
39
this . _bucketsTotalWeight = 0 ;
40
- this . _interval = setInterval ( ( ) => this . _flush ( ) , DEFAULT_FLUSH_INTERVAL ) ;
40
+ this . _interval = setInterval ( ( ) => this . _flush ( ) , DEFAULT_FLUSH_INTERVAL ) . unref ( ) ;
41
41
this . _flushShift = Math . floor ( ( Math . random ( ) * DEFAULT_FLUSH_INTERVAL ) / 1000 ) ;
42
42
this . _forceFlush = false ;
43
43
}
Original file line number Diff line number Diff line change @@ -30,8 +30,8 @@ export class SessionFlusher implements SessionFlusherLike {
30
30
this . _pendingAggregates = { } ;
31
31
this . _isEnabled = true ;
32
32
33
- // Call to setInterval, so that flush is called every 60 seconds
34
- this . _intervalId = setInterval ( ( ) => this . flush ( ) , this . flushTimeout * 1000 ) ;
33
+ // Call to setInterval, so that flush is called every 60 seconds.
34
+ this . _intervalId = setInterval ( ( ) => this . flush ( ) , this . flushTimeout * 1000 ) . unref ( ) ;
35
35
this . _sessionAttrs = attrs ;
36
36
}
37
37
You can’t perform that action at this time.
0 commit comments