My client is making a call to the server.
Meteor.call('someRequest', params, onAllDoneCallback);
that is processed by (server code)
Meteor.methods({
'someRequest': function(params, cb) {
anAsyncFunction(params, cb);
return true;
},
});
I'd like the onAllDoneCallback
to be triggered on the client side once the anAsyncFunction
has finished and triggers its own callback.
However, in Meteor it seems that the second argument of someRequest
is ignored and that the onAllDoneCallback
is triggered with what someRequest
returns, which here is true
and which is called before that anAsyncFunction
has finished.
In my case I'm more concerned about the timing issue (I'm using it to tell the client that the processing is finished, and not just that the request is well received) but other will probably want to call the callback with arguments from anAsyncFunction