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