-
Notifications
You must be signed in to change notification settings - Fork 27
Multiple try/catch+zombie fixes #97
base: master
Are you sure you want to change the base?
Conversation
Prevent zombie processes with proper promisified recursion
Hey @hlolli, I think the idea you're going for here on this PR is good and makes sense. Are you available to chat about this source and Vartex sometime soon? You can actually review: https://github.com/ArweaveTeam/gateway/tree/v1.0.1 Thanks. |
I'm also probably going to migrate the improvements to try/catch queries to that branch. Unless you want to open a PR to v1.0.1 with that specifically. Thank you :) |
The issue at the time was that errors were taking place and they weren't visible. I have since discovered the culprit, which is that streams need to be handled with .on("error", cb) since the callsite where the error is thrown isn't always at the consumer side where we are trying to catch the error. Irritating when this caveat isn't known. Let's chat soon! |
Changes
Rebased over #96, I'll re-rebase after that gets merged.
But the problem I'm hitting is stuff like this, and for parts which can fail, should fail. The stack gets usually lost in async functions (not in Promises) and a series of them, makes debugging very tedious.
With this change I'm able to get somewhat started