Skip to content
Discussion options

You must be logged in to vote

Ah, another problem is that any stubs passed as arguments to your RPC method will be disposed as soon as it returns. To keep copies of them long term, you need to call .dup() on them.

this.callbacks.push(callback.dup())

This is covered in the readme.

Also, if you were properly catching exceptions from the callback and reporting them, it would have told you the problem is that it is disposed. However in order to catch exceptions from the callback, you have to await it. Currently it looks like you have it in a try/catch but you did not await it, so the try/catch ends before the callback actually throws.

(This would also normally show up as an "unhandled rejection", which you could be monito…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@jim-alexander
Comment options

@kentonv
Comment options

@jim-alexander
Comment options

@kentonv
Comment options

Answer selected by jim-alexander
@jim-alexander
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants