Closed 27leaves closed 5 years ago
In autobahnjs, I have the possibility to return a promise, and the function session.call will only be called when the promise resolves.
session.call
async function add2(args, kwargs) { //await whatever, database calls etc return args[0] + args[1]; } session.register('com.example.add2', add2);
In autobahn, it returns the result, in thruway it only returns an empty object. Is there a way to do this?
Thanks!
Can you install 2.0.0beta8 and try the following:
async function add2(a, b) { return a + b; } wamp.register('add.rpc', add2).subscribe();
Amazing! Quick fix as every time :) Thank you!
In autobahnjs, I have the possibility to return a promise, and the function
session.call
will only be called when the promise resolves.In autobahn, it returns the result, in thruway it only returns an empty object. Is there a way to do this?
Thanks!