mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
check connection every 5m
Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
parent
14a0c9cdca
commit
acd8940e0d
@ -93,7 +93,7 @@ export class KubeWatchApi {
|
|||||||
|
|
||||||
window.addEventListener("online", () => this.connect());
|
window.addEventListener("online", () => this.connect());
|
||||||
window.addEventListener("offline", () => this.disconnect());
|
window.addEventListener("offline", () => this.disconnect());
|
||||||
setInterval(() => this.connectionCheck(), 30000);
|
setInterval(() => this.connectionCheck(), 60000 * 5); // every 5m
|
||||||
}
|
}
|
||||||
|
|
||||||
getSubscribersCount(api: KubeApi) {
|
getSubscribersCount(api: KubeApi) {
|
||||||
@ -156,6 +156,11 @@ export class KubeWatchApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected connectionCheck() {
|
protected connectionCheck() {
|
||||||
|
this.log({
|
||||||
|
message: "connection check",
|
||||||
|
meta: { connected: this.isConnected },
|
||||||
|
});
|
||||||
|
|
||||||
if (this.isConnected) return;
|
if (this.isConnected) return;
|
||||||
|
|
||||||
return this.connect();
|
return this.connect();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user