Closed caracal7 closed 4 years ago
// deepstream@5.0.9 await ds.record.getRecord(key) // this callback still working after unsubscribe .subscribe(record => console.log('subscribe cb', record) , true); // try to unsubscribe const record = await ds.record.getRecord(key); await record.whenReady(); record.unsubscribe(); // also did't unsubscribe // record.discard();
UPD:
Found the problem. I forgot await record.whenReady(); between const record = await ds.record.getRecord(key); and record.discard(); in my actual code.
await record.whenReady();
const record = await ds.record.getRecord(key);
record.discard();
Everything is working as expected
👍
UPD:
Found the problem. I forgot
await record.whenReady();
betweenconst record = await ds.record.getRecord(key);
andrecord.discard();
in my actual code.Everything is working as expected