Fix notifications in etctree
parent
5f645c5e44
commit
84533dc9ef
|
@ -269,10 +269,10 @@ class EtcTree
|
||||||
{
|
{
|
||||||
cur_old.value = cur_new.value;
|
cur_old.value = cur_new.value;
|
||||||
const key_watchers = (cur_old.key_watchers ? [ ...watchers, ...(cur_old.key_watchers||[]) ] : watchers);
|
const key_watchers = (cur_old.key_watchers ? [ ...watchers, ...(cur_old.key_watchers||[]) ] : watchers);
|
||||||
const notify = { watchers: key_watchers, key, value: cur_old.value, mod_revision: cur_old.mod_revision };
|
const notify = { watchers: key_watchers, key, value: cur_new.value, mod_revision: cur_new.mod_revision };
|
||||||
if (cur_old.lease)
|
if (cur_new.lease)
|
||||||
{
|
{
|
||||||
notify.lease = cur_old.lease;
|
notify.lease = cur_new.lease;
|
||||||
}
|
}
|
||||||
notifications.push(notify);
|
notifications.push(notify);
|
||||||
}
|
}
|
||||||
|
@ -498,7 +498,7 @@ class EtcTree
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this._put({ key: ev.key, value: ev.value }, ev.mod_revision, notifications);
|
this._put({ key: ev.key, value: ev.value, lease: ev.lease }, ev.mod_revision, notifications);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue