forked from ronzeidman/rebirthdbts
-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Labels
bugSomething isn't workingSomething isn't working
Description
I am having the same issue as
#8
I am closing the cursor of a changefeed using a connectPool
// Connection pool options
const options = {
silent: true,
host: "localhost",
port: 28015,
db: "mydb",
buffer: 50,
};
await r.connectPool(options);
console.log("RethinkDB connection pool established");
Then I create the cursor:
cursor = await r.table("settings").get(userId).changes(changeOptions).run();
cursor.each((err, change) => {
if (err) {
console.error(err);
return;
}
if (change) {
try {
emit("settings", JSON.stringify(change));
} catch (e) {
console.error("Error emitting data:", e);
}
}
});
and when I try to .close() it, it will produce the error:
RethinkDBError [ReqlDriverError]: Query cancelled in:
r.db("mydb").table("settings").get(
As you can see im already using silent as suggested in #8 but it still appears
I have also tried
log: (message: string) => {},
Changing
https://github.com/rethinkdb/rethinkdb-ts/blob/9b9810dfb9a09283e0ab57d84edd631d2d936f53/src/connection/socket.ts#L182C18-L182C18
This line to if (data?.queue.length > 0) { does seem to solve the issue, but im no expert and this might be plain wrong.
Thanks in advance!
atassis
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working