Closed il3ven closed 2 years ago
btw do we even need this try catch? What if we just allow all errors from await boot to throw?
btw do we even need this try catch? What if we just allow all errors from await boot to throw?
I tried this approach and the problem remains the same. Since, it is an async function we get UnhandledPromiseRejectionWarning
and the program doesn't exit.
Note: In Node 16 we will not get aUnhandledPromiseRejectionWarning
and the application will crash as you expect. https://nodejs.org/dist/latest/docs/api/deprecations.html#dep0018-unhandled-promise-rejections
https://github.com/neume-network/strategies/pull/272#issuecomment-124125230
I briefly checked node 15.0.0 and 16.0.0 release log and I couldn't find any major upgrade we'd have to make in our code.
Closing in favour of neume-network/core#88
If the control flow reaches here then there isn't anything else to execute. But the process won't exit because worker is still running. So, we force close using process.exit().