refactor: webui config
This commit is contained in:
1 parent
7b09479cd2
commit
6980a9f3fc
3 files changed
+37
-22
No files matched your search
@@ -35,10 +35,13 @@ setTimeout(() => {
|
||||
}, 0);
|
||||
|
||||
|
||||
class HTTPHeart{
|
||||
class HTTPHeart {
|
||||
intervalId: NodeJS.Timeout | null = null;
|
||||
start(){
|
||||
const { heartInterval, } = ob11Config;
|
||||
start(NewHeartInterval: number | undefined = undefined) {
|
||||
let { heartInterval } = ob11Config;
|
||||
if (NewHeartInterval && !Number.isNaN(NewHeartInterval)) {
|
||||
heartInterval = NewHeartInterval;
|
||||
}
|
||||
if (this.intervalId) {
|
||||
clearInterval(this.intervalId);
|
||||
}
|
||||
@@ -48,8 +51,8 @@ class HTTPHeart{
|
||||
}, heartInterval);
|
||||
}
|
||||
|
||||
stop(){
|
||||
if (this.intervalId){
|
||||
stop() {
|
||||
if (this.intervalId) {
|
||||
clearInterval(this.intervalId);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user