File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -123,21 +123,26 @@ export class BaseTelemetryAppender implements ITelemetryAppender {
123
123
this . _exceptionQueue = [ ] ;
124
124
}
125
125
126
+ private isInstantiating = false ;
127
+
126
128
/**
127
129
* Instantiates the telemetry client to make the appender "active"
128
130
*/
129
131
instantiateAppender ( ) : void {
130
- if ( this . _isInstantiated ) {
132
+ if ( this . isInstantiating || this . _isInstantiated ) {
131
133
return ;
132
134
}
133
- this . _isInstantiated = true ;
135
+ this . isInstantiating = true ;
134
136
135
137
// Call the client factory to get the client and then let it know it's instatntiated
136
138
this . _clientFactory ( ) . then ( client => {
137
139
this . _telemetryClient = client ;
140
+ this . _isInstantiated = true ;
138
141
this . _flushQueues ( ) ;
139
142
} ) . catch ( err => {
140
143
console . error ( err ) ;
144
+ } ) . finally ( ( ) => {
145
+ this . isInstantiating = false ;
141
146
} ) ;
142
147
}
143
148
}
You can’t perform that action at this time.
0 commit comments