Commit 9648e5ba by 姜雷

关闭socket时取消计时器

parent ec432609
......@@ -224,7 +224,7 @@ class Shower extends Component {
}
closeDeviceSocket() {
const { task } = this.state;
const { task, timer } = this.state;
console.log('in close', task);
if (task) {
task.close({
......@@ -236,6 +236,9 @@ class Shower extends Component {
},
});
}
if (timer) {
clearTimeout(timer);
}
}
checkUsingDevice() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment