antietcd 1.0.4 → 1.0.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.
- package/antietcd.js +3 -3
- package/etctree.js +5 -0
- package/package.json +1 -1
package/antietcd.js
CHANGED
|
@@ -428,7 +428,7 @@ class AntiEtcd extends EventEmitter
|
|
|
428
428
|
{
|
|
429
429
|
throw new RequestError(400, 'Watch not found');
|
|
430
430
|
}
|
|
431
|
-
this.etctree.api_cancel_watch(
|
|
431
|
+
this.etctree.api_cancel_watch(mapped_id);
|
|
432
432
|
delete this.api_watches[watch_id];
|
|
433
433
|
}
|
|
434
434
|
|
|
@@ -514,7 +514,7 @@ class AntiEtcd extends EventEmitter
|
|
|
514
514
|
const mapped_id = client.watches[msg.cancel_request.watch_id];
|
|
515
515
|
if (mapped_id)
|
|
516
516
|
{
|
|
517
|
-
this.etctree.api_cancel_watch(
|
|
517
|
+
this.etctree.api_cancel_watch(mapped_id);
|
|
518
518
|
delete client.watches[msg.cancel_request.watch_id];
|
|
519
519
|
socket.send(JSON.stringify({ result: { header: { revision: this.etctree.mod_revision }, watch_id: msg.cancel_request.watch_id, canceled: true } }));
|
|
520
520
|
}
|
|
@@ -542,7 +542,7 @@ class AntiEtcd extends EventEmitter
|
|
|
542
542
|
for (const watch_id in this.clients[client_id].watches)
|
|
543
543
|
{
|
|
544
544
|
const mapped_id = this.clients[client_id].watches[watch_id];
|
|
545
|
-
this.etctree.api_cancel_watch(
|
|
545
|
+
this.etctree.api_cancel_watch(mapped_id);
|
|
546
546
|
}
|
|
547
547
|
}
|
|
548
548
|
}
|
package/etctree.js
CHANGED
|
@@ -446,6 +446,11 @@ class EtcTree
|
|
|
446
446
|
{
|
|
447
447
|
this._delete_range({ key: this.use_base64 ? this.b64(key) : key }, next_revision, notifications);
|
|
448
448
|
}
|
|
449
|
+
if (this.leases[id].timer_id)
|
|
450
|
+
{
|
|
451
|
+
clearTimeout(this.leases[id].timer_id);
|
|
452
|
+
this.leases[id].timer_id = null;
|
|
453
|
+
}
|
|
449
454
|
delete this.leases[id];
|
|
450
455
|
}
|
|
451
456
|
|