vertx-bus-bower
vertx-bus-bower copied to clipboard
Unregister handler with lamdba function as callback
Hi ,
To unregister an handler, we have to pass to callback function used during the register.
However when using typescript , i use lambda function :
...
this.eventBus.registerHandler('/' + projectId
+ '.' + faulttreeId + '/' + 'diag', {} ,(err, resp)=>{
console.log(resp);
this.handleServerResponse(child.data.uuid,resp);
});
However it is impossible to unregister this handler ...
This is due to this var idx = handlers.indexOf(callback);
which return -1.
I think we could return either the address or the index and use that as the key to unregister.
Yes that would be great indeed !