@kokimoki/app 0.6.4 → 0.6.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -95,9 +95,13 @@ export class KokimokiClient extends EventEmitter {
95
95
  this.checkConnectionState();
96
96
  }
97
97
  checkConnectionState() {
98
- const pongReceived = Date.now() - this._lastPongAt < 6000;
98
+ const pongReceived = Date.now() - this._lastPongAt > 6000;
99
99
  if (!pongReceived && this._synced) {
100
- this._providers.forEach((provider) => provider.disconnect());
100
+ // Reset connections to providers
101
+ this._providers.forEach(async (provider) => {
102
+ provider.disconnect();
103
+ await provider.connect();
104
+ });
101
105
  }
102
106
  const synced = pongReceived &&
103
107
  !Array.from(this._providers.values()).some((provider) => provider.status !== "connected" || !provider.synced);
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const KOKIMOKI_APP_VERSION = "0.6.4";
1
+ export declare const KOKIMOKI_APP_VERSION = "0.6.6";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const KOKIMOKI_APP_VERSION = "0.6.4";
1
+ export const KOKIMOKI_APP_VERSION = "0.6.6";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kokimoki/app",
3
- "version": "0.6.4",
3
+ "version": "0.6.6",
4
4
  "type": "module",
5
5
  "description": "Kokimoki app",
6
6
  "main": "dist/index.js",