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 {
3737 public constructor ( private readonly _client : Client ) {
3838 this . _buckets = new Map ( ) ;
3939 this . _bucketsTotalWeight = 0 ;
40- this . _interval = setInterval ( ( ) => this . _flush ( ) , DEFAULT_FLUSH_INTERVAL ) ;
40+ this . _interval = setInterval ( ( ) => this . _flush ( ) , DEFAULT_FLUSH_INTERVAL ) . unref ( ) ;
4141 this . _flushShift = Math . floor ( ( Math . random ( ) * DEFAULT_FLUSH_INTERVAL ) / 1000 ) ;
4242 this . _forceFlush = false ;
4343 }
Original file line number Diff line number Diff line change @@ -30,8 +30,8 @@ export class SessionFlusher implements SessionFlusherLike {
3030 this . _pendingAggregates = { } ;
3131 this . _isEnabled = true ;
3232
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 ( ) ;
3535 this . _sessionAttrs = attrs ;
3636 }
3737
You can’t perform that action at this time.
0 commit comments