File tree 1 file changed +9
-1
lines changed
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -688,6 +688,14 @@ class LrsCallState {
688
688
this . sendStats ( ) ;
689
689
}
690
690
691
+ destroy ( ) {
692
+ if ( this . statsTimer ) {
693
+ clearInterval ( this . statsTimer ) ;
694
+ this . statsTimer = null ;
695
+ }
696
+ return null ;
697
+ }
698
+
691
699
private handleStreamStatus ( status : StatusObject ) {
692
700
this . client . trace (
693
701
'LRS stream ended. code=' + status . code + ' details= ' + status . details
@@ -938,7 +946,7 @@ class XdsSingleServerClient {
938
946
}
939
947
940
948
handleLrsStreamEnd ( ) {
941
- this . lrsCallState = null ;
949
+ this . lrsCallState = this . lrsCallState ? this . lrsCallState . destroy ( ) : null ;
942
950
/* The backoff timer would start the stream when it finishes. If it is not
943
951
* running, restart the stream immediately. */
944
952
if ( ! this . lrsBackoff . isRunning ( ) ) {
You can’t perform that action at this time.
0 commit comments