diff --git a/packages/kubekit-client/package.json b/packages/kubekit-client/package.json index 918388bf..7b0bb4b3 100644 --- a/packages/kubekit-client/package.json +++ b/packages/kubekit-client/package.json @@ -1,6 +1,6 @@ { "name": "@kubekit/client", - "version": "0.0.19", + "version": "0.0.20", "main": "lib/index.js", "types": "lib/index.d.ts", "author": "kahirokunn", diff --git a/packages/kubekit-client/src/client/index.ts b/packages/kubekit-client/src/client/index.ts index 3c51d66b..5f7e0051 100644 --- a/packages/kubekit-client/src/client/index.ts +++ b/packages/kubekit-client/src/client/index.ts @@ -399,7 +399,7 @@ class Debounce { const oldestElapsedTime = now - getOldestPushedAt if (this.#maxWaitMilliSeconds > oldestElapsedTime && this.#waitMilliSeconds > currentElapsedTime) { - await sleep(this.#waitMilliSeconds); + await sleep(this.#waitMilliSeconds - currentElapsedTime); } if (BigInt(resourceVersion) === getLatestResourceVersion()) { this.#cache.delete(cacheKey);