Skip to content

Commit

Permalink
rename variable
Browse files Browse the repository at this point in the history
  • Loading branch information
silesky committed Sep 29, 2022
1 parent 21b2ea0 commit 5686250
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/node/src/app/analytics-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export class AnalyticsNode
implements CoreAnalytics
{
private _eventFactory: EventFactory
private _drainedTimeout?: ReturnType<typeof setTimeout>
private _drainedEventEmitTimeout?: ReturnType<typeof setTimeout>
private _drainedDelay: number
private _isClosed = false
private _pendingEvents = 0
Expand Down Expand Up @@ -138,8 +138,8 @@ export class AnalyticsNode

this._pendingEvents++

if (this._drainedTimeout) {
clearTimeout(this._drainedTimeout)
if (this._drainedEventEmitTimeout) {
clearTimeout(this._drainedEventEmitTimeout)
}

dispatchAndEmit(segmentEvent, this.queue, this, {
Expand All @@ -150,7 +150,7 @@ export class AnalyticsNode
this._pendingEvents--

if (!this._pendingEvents) {
this._drainedTimeout = setTimeout(() => {
this._drainedEventEmitTimeout = setTimeout(() => {
this.emit('drained')
}, this._drainedDelay)
}
Expand Down

0 comments on commit 5686250

Please sign in to comment.