oortcloud / node-ddp-client

A callback style DDP (Meteor's Distributed Data Protocol) node client.
Other
263 stars 80 forks source link

Methods are not resolved when reconnecting #93

Open dnish opened 6 years ago

dnish commented 6 years ago

Hey, if the connection fails while calling a method, the method will never be resolved even if I've enabled autoReconnect. For example:

async function test() {

    const a = new DDPClient();
    await a.connect();

   // We shut down the DDP server to simulate a failing connection
    setTimeout(async () => {
        const testy = await a.call("categories.get");
        console.log(testy);
    },5000)
}

The promise/callback will never be resolved when we've enabled useSockJs:true.