autobee-wakeup 1.0.1 → 1.0.3
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.
- package/index.js +4 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -60,7 +60,7 @@ module.exports = class AutobeeWakeup extends ReadyResource {
|
|
|
60
60
|
const prev = this._hints.get(hex)
|
|
61
61
|
if (!prev || length === -1 || prev < length) this._hints.set(hex, length)
|
|
62
62
|
}
|
|
63
|
-
this.
|
|
63
|
+
this._auto.bumpSoon()
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
async flush() {
|
|
@@ -69,12 +69,12 @@ module.exports = class AutobeeWakeup extends ReadyResource {
|
|
|
69
69
|
|
|
70
70
|
for (const [hex, length] of hints) {
|
|
71
71
|
const key = b4a.from(hex, 'hex')
|
|
72
|
-
if (this.
|
|
72
|
+
if (this._auto.writers.has(hex)) continue
|
|
73
73
|
if (length !== -1) {
|
|
74
|
-
const info = await this.
|
|
74
|
+
const info = await this._auto.system.get(key)
|
|
75
75
|
if (info && length <= info.length) continue // stale hint
|
|
76
76
|
}
|
|
77
|
-
await this.
|
|
77
|
+
await this._auto.writers.wakeup(key, length === -1 ? 0 : length)
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
|