Ver Fonte

Stop websocket when tab changes

jnfrati há 4 anos atrás
pai
commit
d4bed08e1e

+ 2 - 0
dashboard/src/main/home/cluster-dashboard/expanded-chart/status/Logs.tsx

@@ -139,6 +139,8 @@ export default class Logs extends Component<PropsType, StateType> {
     if (prevState.currentTab !== this.state.currentTab) {
     if (prevState.currentTab !== this.state.currentTab) {
       let { selectedPod } = this.props;
       let { selectedPod } = this.props;
 
 
+      this.ws?.close();
+
       this.setState({ logs: [] });
       this.setState({ logs: [] });
 
 
       if (this.state.currentTab == "Application") {
       if (this.state.currentTab == "Application") {