File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -676,6 +676,7 @@ class LrsCallState {
676
676
this . handleStreamStatus ( status ) ;
677
677
} ) ;
678
678
call . on ( 'error' , ( ) => { } ) ;
679
+ this . sendStats ( ) ;
679
680
}
680
681
681
682
private handleStreamStatus ( status : StatusObject ) {
@@ -714,10 +715,13 @@ class LrsCallState {
714
715
}
715
716
716
717
private sendLrsMessage ( clusterStats : ClusterStats [ ] ) {
717
- this . call . write ( {
718
- node : this . sentInitialMessage ? this . node : null ,
718
+ const request : LoadStatsRequest = {
719
+ node : this . sentInitialMessage ? null : this . node ,
719
720
cluster_stats : clusterStats
720
- } ) ;
721
+ } ;
722
+ this . client . trace ( 'Sending LRS message ' + JSON . stringify ( request , undefined , 2 ) ) ;
723
+ this . call . write ( request ) ;
724
+ this . sentInitialMessage = true ;
721
725
}
722
726
723
727
private get latestLrsSettings ( ) {
@@ -791,7 +795,6 @@ class LrsCallState {
791
795
}
792
796
}
793
797
}
794
- this . client . trace ( 'Sending LRS stats ' + JSON . stringify ( clusterStats , undefined , 2 ) ) ;
795
798
this . sendLrsMessage ( clusterStats ) ;
796
799
797
800
}
You can’t perform that action at this time.
0 commit comments